When this was created 100s of years ago, it was a wild west of stupidity and not as controlled as now. So every person from someone living in a dirty crappy village to a guy living alone in the mountains had to be weary of intruders, and at that time it was unpredictable how good, evil, or effective the government would be to help people in need.
There isn't even a militia now as the government has formal control, policies, and organized legions of cops and soldiers to protect people.
Any kind of weapon back then (in this case guns as that's what everyone uses and kills with), were crude and slow. The laws made at the time involved weapons that did not have automatic fire, fast changing clips and range that's probably triple what it was back then.
Like everything in life, laws need to change to reflect modern times. Just like internet issues. You got all the copyright debates going back and forth years back because nowhere in law did it mean digital media. Well, laws are updated to include downloading now. So there's an example of changing things to reflect reality.
To take it to a silly extreme, let's say gun makers invent Star Trek phasers at some point. Aim, click and a laser travelling at light speed with infinite range instantly vapourizes someone.
Common sense would say, there's got to be regulation on these new insta-kill zappers. But pro-gun users will some reason keep advocating...... "More zappers needed"