My shotgun needs to be racked before it is of any use to me. I do that not to warn intruders, but because I'm not comfortable having a live round in the chamber on a gun that sits in my closet.
That's how shotguns are kept, since many, like the 870 aren't drop safe. There are other safety concerns, as well.
LE is taught to rack the shotgun when "it's use looks imminent". In a home situation that could alert the intruder, but you'll find with a little practice, that you can, from a low ready, rack a shotgun and bring it on target with just about zero time lost over a shotgun that's already racked.
If you have some warning, it can be racked a little more discreetly where most of the noise is the shell popping out of the magazine.