I worked at an Arby's back in high school (over 20 years ago). They told me free refills were a thing because most customers don't refill more than once, if at all. Also, the soda water costs pennies and the bags of concentrated soda syrup were only like $10 (at the time). A single bag of syrup, mixed with soda water, could fill customer's soda cups for maybe 2-3 days before it needed to be replaced. Fast food restaurants make insane profits on soda, so they don't care if customers refilled multiple times during their visit.