You have no idea how little a wall does to the path of a bullet until you've seen it.
I've seen a round from an AK47 that went through the outer wall of a house (with heavy wooden siding), through the kitchen wall, and through the cupboards, before burying itself in the opposite wall. And this was a hollow point round. (Guy using SKS for home defense, take note of this one).
I've fired a .50 BMG from 100m at a target that was stapled to a board, leaning against a thin sheet of aluminum, in front of a backstop of tractor tires, wood, and dirt. The round blew through all of it and buried itself somewhere in the dirt backstop.
Just a few months ago, a man in my town was shot in the face with a .22LR. A guy had walked by, spraying his house with bullets. A round from a lowly .22 pistol penetrated the wall and had enough force to wound a man inside.
I'm no expert, then I'm also no novice - But I assure you that you that you have no business using a rifle or other large caliber or high velocity weapon inside a house for any purpose, even self defense. Short of living alone/having all people in the home in 1 room and being in a rural setting, if you want home defense, use a pistol, and use the right ammunition.
Accidents like the one we're talking about are so anger inspiring because following the most basic rules of gun handling prevent them virtually 100% of the time. Every time some fool pulls a stunt like this, it reflects badly on those of us who have spent years safely enjoying shooting sports.
The standing rules (these among many others) with those I shoot with is to never, ever, leave a weapon loaded, always assume it is loaded, and leave the actions locked open on everything not in use. Once you're pointed down range, you can close your action and fire away. Which is another point of safety which is often overlooked - dont close the action on your weapon (this goes for autoloaders) unless you're pointed down range. If you've never had a slam-fire, be thankful. If you have, you'll know why this is just as important as all the other gun rules you were taught.
All I can say is use common sense. If you think, even a little, that what you're doing is stupid or dangerous, it almost certainly is. Some people...