Why operate the grill or fryer? To sell food and make money. Instead of selling someone a meal for $7 McDonalds can sell them a meal + a mcflurry for $10. Why wouldn't they want to do this?
It doesn't make any sense that a bunch of franchise owners are all in together on some kind of ice cream conspiracy. Surely the truth is less interesting, it's most likely just a boring cost/benefit analysis. There seems to be some flaw with the machines they use that make them particularly prone to breaking down and difficult to maintain. So some stores that don't sell a lot of ice cream anyway decide it's not worth the cost of keeping them running, while other stores that sell more do keep them running.
And surely it's no coincidence that the markets where people buy more ice cream are also where Dairy Queen stores are more likely to open up.