you are better served with a handgun based on size
A grown man, with his arms stretched out in typical handgun stance is pretty long. Often comparable to the same man with a carbine, in a traditional rifleman's stance with the stock firmly planted in the shoulder pocket. Not all rifles have 26" barrels.
time it takes to bring it into action
Let's assume the gun is on the table and unloaded. Pick up gun. Insert mag. Rack slide or pull charging handle. With similar training, the average person could probably do it to either a handgun or rifle in the same amount of time.
along with carrying convenience.
Where are you carrying it? Yes, on a hike through the woods, a holstered pistol is generally lighter and easier to carry than a rifle. In your house? Unless you have experience clearing a home (which the police should do anyway) this seems to be a non-issue. I doubt most of us have the ability to effectively "slice the pie" with a handgun or a rifle.
racking a shotgun is a great deterrent
Watch less television. Ever been near someone using a shotgun? I have. Racking the slide did NOT make me poop my pants, cry, run away, or pass out and I'm not a particularly "tough" guy.
Racking a shotgun is a great way to give away your location to a potential attacker. If you enjoy that, rack the slide on your pistol, spin the cylinder of your revolver, work the bolt of your Rem 700, or pull the charging handle on your autoloader. All of them make unnecessary noise.
Yes, a shotgun can be quite powerful with the right ammo. However, I wouldn't want to be shot with any gun, long or short. If an attacker decides he wants to fight because you have "only" a .45 or "only" a .308 and not a shotgun, the dude is on crack and/or certifiably nuts.
and spray of buckshot \ birdshot.
First, leave the birdshot for birds. It generally does not have enough penetration to stop an attacker quickly. It'll make a nasty mess, however.
As for "spray," spend some time patterning a shotgun with typical HD loads at HD distances. (Or, do a search here on THR.) A shotgun does not have the spread of Aqua Net aerosol.
Is it just for people that also hunt
Possibly. Some folks can only afford one gun. If it's a rifle, it sure beats harsh words and no gun.
is it a matter of being prepared to turn your home into a fortress and fight at long range?
Hmmm. I suppose that is a consideration if:
A) The Red Army has landed ala "Red Dawn"
B) Zombies/The Infected have taken over ala "28 Days Later"
C) I've been very bad and the ATF is outside to lock me up ala "Branch Davidians/Waco"
Watch less television.
The most realistic situation would be riots as seen in LA. If you are shooting people 100 yards away, those are some SERIOUS riots. Most folks would agree that 100 yards is not "HD" distance. For perspective, go to the high school football field and stand in the end zone. Bring a friend and have them stand in the other. How much of a threat are they? Give them a bat, a knife. Still a threat? Give them a handgun (ok, don't do this for real on school grounds). Still a threat, while you are inside your house with the benefit of possible concealment?
And even though you didn't mention it, handgun rounds, slugs, and buckshot have GREAT penetration through walls.