The only reason it is legal is because of a 5-4 decision. Change one jurist and it would be a different matter. Scalia worked himself into pretzels to make it appear as if the amendment was not about militias. Have you read Stephens dissent?
"militia" preamble and exact phrase "to keep and bear arms" demands the conclusion that the Second Amendment touches on state militia service only; that many lower courts' later "collective-right" reading of the Miller decision constitutes stare decisis, which may only be overturned at great peril; and that the Court has not considered gun-control laws (e.g., the National Firearms Act) unconstitutional. The dissent concludes, "The Court would have us believe that over 200 years ago, the Framers made a choice to limit the tools available to elected officials wishing to regulate civilian uses of weapons.... I could not possibly conclude that the Framers made such a choice."
Or Bryers? "But what sense does this approach make? According to the majority’s reasoning, if Congress and the States lift restrictions on the possession and use of machineguns, and people buy machineguns to protect their homes, the Court will have to reverse course and find that the Second Amendment does, in fact, protect the individual self-defense-related right to possess a machine-gun...There is no basis for believing that the Framers intended such circular reasoning."[54]
So the only thing Heller proved was that if you pack the court with the right type of jurists, you get the decisions you want. While Heller does stand, I can see it being overturned at some point in the future. It might take a horrible event to do so considering the amount of death the gun nuts already accept as the price to pay for arming themselves to the teeth. Say a future event has a crazy gunman mowing down NASCAR fans at Talladega. Or maybe a bunch of black men annihilating hundreds of Liberty Students at mass. Nah, that won't budge them a bit either, they will just want more guns.