Link to comic: https://xkcd.com/2821/
and I thought this had to do with light refraction lol
It does: Light does not follow the path of minimal distance between two points, but the path of minimal time. This is called Fermat’s principle.
Because water has a higher refraction index than air, light is slower in it and therefore takes a longer time to travel through it. Thus, it takes less time to take a longer path that spends more time in the air.
Fun fact: The underlying law of this principle is the principle of least action. This is the most basic law of nature we know of and can be used to derive all of physics.
I’d add to this that, if I’m not mistaken, it’s because light takes all possible paths and the average measured time is longer