That seems rather high for a simple gallon of clean, frozen water bits in bulk. I'm gonna say maybe it's your region or something else every accountant at every fast food place is an idiot cause they always fill it up with ice, many even having lines on the cups where employees are to fill to. In the case given of Sonic, they fill it completely full. I find it highly suspicious they would consistently do that with the most expensive part and would instead look to reduce costs, esp at a firm that has happy hours every day with half price drinks.
Water around here is something like 2.45 USD per 1000 gallons out of the tap. Add an ice machine which is basically a sunk cost and then periodically have filters changed, negligible, and electricity is only around 10 cents per kWh so I'd be curious to see those calculations.