The Supreme Court also stated that the leading phrase also only provides ONE reason for the protection of the individual right, not the ONLY reason.  The right exists outside of service or membership in the militia.

That said, a case can be made that the various states have been neglecting a primary duty of ensuring that all citizens are prepared to to take up their duty of serving in the militia at need.  Requiring all 16 year old males (and females who volunteer) to go through a basic military training regimen (including firearms training) over the summer when school is out would go a long way towards resolving this deficiency.