Pistols aren't good home defense weapons because the bullet fired from one has a lot more penetrating power than each pellet from a shotgun. A wall will probably stop a shotgun blast, but a stray shot from a pistol can hit someone outside the house.
There's so much misinformation in this thread. It depends on your shotgun load. Sure, a pistol might have more penetration then birdshot, but in a self defense situation you don't want birdshot, you want buckshot or a slug. The latter, especially will punch through several walls. Sometimes you need penetration but should always be mindful of where the bullets will travel.