From The Truth About Guns:
Personal self-defense is certainly a critical aspect of the Second Amendment, but both the founders as well as the generations immediately after them considered one other purpose paramount: a final defense against a tyrannical government that attempts to overthrow our constitutional order.
Embarrassing as it may be to admit for some polite society academics of today, the Bill of Rights was written by people who just finished violently overthrowing their former government. Based on that experience, they were obviously very fearful of the new government they were forming becoming tyrannical, and so they included the Second Amendment, in part, as a failsafe.