A number of accidents have occurred over the years when a shot went through a wall and killed a neighbor, or another occupant of the house. I know a man who accidentally killed his wife with an unintentionally- discharged .45 hardball round that went through multiple walls before it struck her between the shoulder blades. Some years ago as an expert witness I was involved in a case of an individual who accidentally discharged a Beretta 9mm upward. The bullet (9mm ball, if memory serves) went through the ceiling, exited the roof, and struck and crippled for life a roofer who was up there working on top of the building.
It happens. It's why we have to consider penetration when we select defensive ammunition. It's also one reason why I recommend a home defense strategy of staying in place in a protective position instead of going looking for the bad guy if you hear "a bump in the night." Once you start moving, it's a tossup where the encounter may take place; if you've stayed put in a preselected spot where you have a good field of fire and know that no innocents are likely to be in line with your gun beyond the wall, you've greatly reduced the hazard.