Another way to think about it is assigning cardinal directions to the Earth. Which way is north from the north pole? There's no possible way to create a map that has defined directions at every point.
The pictures in the Wikipedia article give a great intuitive understanding, particularly if you can figure out why a sphere and torus behave differently. (You can build a globally consistent map on a torus.)
No, you can not, there is no global map on the torus.
What I mean is that you can assign a direction to each point of the torus, and have it be consistent with it's neighbors (free of discontinuities) throughout the entire surface. This is in contrast to a sphere, which will always have tufts (poles) at at least one point.
Note that this only applies within the surface itself, not to it's embedding in 3d space (the donut shape we're all familiar with). If north points up on the outside edge, it'll point down to us on the inside edge, but an ant on the surface would experience no contradictions.
https://en.wikipedia.org/wiki/Torus#/media/File:Torus_cycles...
Any solution will have a discontinuity in its output vector angles. I don't know how this problem is applied in computer graphics, but you probably want to avoid rendering objects in the vicinity of a discontinuity: you'd get some kind of flickering artifact when you cross it, with small ɛ-displacements being amplified into something much larger.
Nitpick: that should be "no single continuous deterministic function"; it's (relatively) very easy to sample uniformly randomly from the unit circle orthogonal to a given non-zero vector, but that won't give, for example, approximately the same result on two consecutive video frames, such that you could usefully orient the camera with that direction "up".
“A common problem in computer graphics is to generate a non-zero vector in R3 that is orthogonal to a given non-zero vector. There is no single continuous function that can do this for all non-zero vector inputs.”