McDonalds or a real restaurant, you probably get free refills if it comes from a "fountain" (on tap soda as opposed to a bottle or can).
As other people have said, it's pretty cheap for a business. And expected, so they look cheap if they don't.
These "free T-shirt" kind of schemes have always the same loophole. They rely on people acting "within measure" naturally due to social norms. Those fall apart quickly when the alternative is infinite free stuff.
In a sense, I'm amazed anyone pays! These drinks are approximately the cost of the water and no one wants to lose a customer over $6 because they were thirsty and got upset at the surprise on the bill. A flat, relatively high but known cost might be better marketing. "No surprises" is the American fast food recipe for marketing/brand success, really.
In France there used to be a single KFC i knew of that did that and later on a law passed that forbade unlimited refills to combat sugar overconsumption and related issues.
However, any food place ( fast food included) are obligated to give you a glass of water if you ask for it, for free.
I am actually amazed that somehwere on a planet, you can (could?) get unlimited refills for coke, etc. Or is it for water?
Anyway, you can't get free water at fast-food anyway. Maybe somwhere at public place you would get free water dispenser, at work etc. But not at fast-food.