While the M4/AR is "more cooler", the pump shotgun has an enormous cost advantage for those people who are looking for a HD weapon on a budget. My personal preference is the 870. For many years, I bought every 870 Wingmaster or 870P I ran across that was in better than decent shape and cost less than $300. I finally had to stop as I had a safe full of shotguns, including two of the original Parkerized 870SP guns with the oiled walnut furniture. The 870 is very easy to service at home, with very few tools needed. About the only one I decided was a must is a forearm wrench. Parts are readily available, especially since whole shotguns cost less than a decent AR upper.
Ammo is available everywhere and was plentiful even during the aftermath of Sandy Hook. The 870 also does not look like an "evil, tacticool" weapon except for those people who festoon the poor gun with all kinds of AR-inspired "accessories", which may be a plus if ever used in a real situation where litigation is a certainty. The pump action also tends to reduce the tendency of people to launch more rounds than needed, as a separate and deliberate action is needed to fire another round.
As noted, there are some negatives. Recoil and stock fit are the two big ones, especially as perceived recoil is worsened by poor stock fit. Most 870 factory stocks are too long for most people. I personally like the Speedfeed IV-S stock as I have short arms. Learning to run the pump gun is another negative as many do not put in the time and rounds, and the 870 action release is in a strange area for newbies. Patterning the gun with your desired HD load is a must, one that most people skip. Rather than change choke tubes, I change shot hardness as the more expensive shells usually have more antimony and pattern tighter.
But if one puts in the time and shells, it is hard to beat the 870 for HD work.