Not just wifi speed, once it gets to your router there isn't a direct connection to the other person's router, there are various interconnects along the way. There will be delays of milliseconds at each of these points. The more in stages there are the more delay there is
Answers & Comments
Yes, it's not just the distance being traveled -- it's also the various pieces of equipment your data traverses through along the way.
The issue is the laws of physics, light can travel only so fast (and electrical signals about the same).
To do a round trip signal around the earth can theoretically take as much as 133ms, longer in real life:
USA to Australia will have long delays due to distance and the speed of light (or electricity)
https://royal.pingdom.com/theoretical-vs-real-worl...
Not just wifi speed, once it gets to your router there isn't a direct connection to the other person's router, there are various interconnects along the way. There will be delays of milliseconds at each of these points. The more in stages there are the more delay there is