"He paid for the damage to the window."
Translation:Li pagis por la damaĝo al la fenestro.
The sentence is not about an action to the window, it's about damage with this preposition used to describe the location of damage. Things can become damaged without movement. I don't think you can do damage in a direction, except in RPG games where they use the word in a countable sense.
So I think the choice of 'to' in English for this situation is reasonably arbitrary and isn't about movement. Prepositions don't always map neatly from one language to another (e.g. por / pro / kontraŭ can be used in ways that 'for' would be used in English), so maybe something else is better here?
Oddly enough, in the two other sentences you gave above, I would always use 'to' and not 'of' or 'on' in English. 'damage of the window' would imply the damage that the window did to something else, and 'damage on the window' - damage is abstract; you can't pick it up or scrape it off, and doesn't sit literally atop or inside the window (as 'on' implies): it's inherent to the window.
Yes, « the choice of 'to' in English for this situation is reasonably arbitrary ». This exists in all languages. Sometimes there is no good preposition, so one use a preposition which seems good. If you use « al / de / por / pro / kontraŭ / je » between damaĝo and fenestro, I always understand.
The 2 other sentences I gave are OK en Eo, but KO en English.