Teenagers have broken brains. Even the "good" ones. I was probably a reasonably "good" kid. Still I did some incredibly stupid stuff that fortunately didn't have worse consequences. A big part of life is figuring out that when you push a glass off the table, it will fall and break, when you put your hand on the stove, you'll get burned, etc. Scale this up into an existence of complex social interactions, and it takes awhile to figure out when you're going to break something and when you're going to burn yourself, metaphorically speaking.
Fortunately most kids figure out its best not to go kill a bunch of their classmates, but I bet quite a few more might do it if the circumstances were just right (wrong). One of those circumstances is, of course, access to a bunch of guns.
Keep your damn guns away from your kids. Even better, melt them down. But at least keep them away.