Why do our eyes "wrap" hue from UV to IR?
Basically.  You are most likely looking at the electromagnetic spectrum, which is linear and conveniently makes sense... except for magenta.

Colors as we perceive them are additive and made up of Red, Green, and Blue; this is opposed to subtractive color we learned about while finger-painting in kindergarten (Red, Yellow, Blue).  The three types of cones in our eyes each are sensitive to one of these colors, and it is from the combinations of Red, Green, and Blue that we see all the colors we see.  Yellow, for example, is when the red and green cones are both stimulated.  Purple/violet is from red and blue stimulated together.  This is the single special case, as you point out, because red and blue are at opposite sides of the spectrum from each other.  Our brain has two options:


Use the color smack-dab in the middle aka Green
Make a new one as if they wrapped around


Green is far away and already taken, so our brain intelligently invents Magenta.  This produces, instead of a linear EM spectra, a circular color wheel that looks very intuitive.