For all we know, all 9 may have agreed that the right to own a firearm is an individual right, but only 5 believed the DC handgun ban violated that individual right. Or some number in between.
If the DC ban covered ALL firearms, and not just a specific type, it could have been a lot different vote.
Actually, we DO know what the rational was. Read the Stevens dissent. It's not what you suggest. Not at all. Stevens (and the other three that joined the dissent) found that the second amendment protects the individual right to bear arms only for certain military purposes and does not limit the authority of legislatures to regulate private, civilian use of firearms. In other words, they didn't complete dismiss the phrase "a well-regulated militia" as the 5 person majority did.