The interesting thing was I realized that the syrup cost $.03 per cup, and McD's was selling it for - I don't remember 45 years later but it was a lot. Puzzled, I asked about it and was told that McD's lost money on the hamburgers and more than made it up with the drinks and fries.
It's also how movie theaters make money. They lose it on ticket sales, and make it up at the concession stand, especially on the soda.
Similarly for restaurants. The drinks are the big moneymakers.
Camera makers don't make money on the camera bodies, but on the lenses and accessories.
Car dealers don't make money selling cars, they make it on the financing and the service.
What I find amazing is the dedication to extracting potentially a little more money from people who may buy one extra cola rather than allowing a refill when the production cost is next to 0, but leaves a more satisfied, and likely return, customer.
Practices like this are likely to turn people off. The fact that they think they can do something like this just displays how much of a monopoly/duopoly this company actually knows it enjoys. Where else will their customers turn? There's nowhere to turn. So gouge them.