Here's the explanation: The fountain area is a trigger zone that puts a buff on you which gives mana, regen, and refills your bottles. The "aura", like most auras in the game, are "sticky", and last for a few seconds upon leaving the trigger zone.
When you TP, you're still affected by the aura which is why you're allowed to TP to a tower at 90% HP and still reach 100% HP after a second or so. While the buff is active on you, bottles can be refilled because it's being constantly applied by the aura. The reason you can refill other people's bottles is the same reason the courier can refill your bottle. The courier isn't doing anything special with bottles. It gets the fountain buff like everyone else and ALL of its bottles will be refilled by the buff.
Boom.
Mechanics.
It is no more or less arbitrary than tread switching and changing it is a balance issue, not a bug fixing one.