I imagine the sale of guns to 18-20 year olds is so small they can absorb that lost profit without even seeing a blip on the profit/loss sheet, whereas a small business maybe can't afford to alienate a segment of the population (and their supporters).
Regardless, no one should be FORCED to sell a product to someone else whether it be a cake, a gun, or a lapdance.