"Does this make sense?"
Another yes, given most ammuniton, certainly most issued to patrol officers and tactical teams. Are there options affording greatere degrees of penetration? Sure. But, I've had the oportunity to observe a MP5 magazine dump into the side of a car followed by the same from an M4 into another. (Same make and model; same target area.) It was clear that more of the 9mm rounds made it thorugh; many more, in fact.
"But even for them under what scenarios are you better off with the shotgun?"
Where close range, rapid, clsoe enough accuracy is called for and third parties aren't in close enough proximity to the subject beingshot at to be a concern.
Very similar criteria, by the way, for when you might flip the lever to burst on an M4.
Meriam Webster's: Main Entry: ci·vil·ian Pronunciation: \sə-ˈvil-yən also -ˈvi-yən\, Function: noun, Date: 14th century, 1: a specialist in Roman or modern civil law, 2 a: one not on active duty in the armed services or not on a police or firefighting force b: outsider 1, — civilian adjective