I'm replacing a single 2-way ceiling light with recessed lighting, and discovered what I think is a switch loop when I pulled the ceiling light out. The confusing part (to me) is that the ceiling light had two 14-2 romex going to it, and one 14-3. All the diagrams I've looked up online show that there should be two 14-3s. What's going on?
You have the power supply coming in from the ceiling (i.e. right side 14-2) and being sent down to the switch or switches (i.e. left side 14-2). What's then sent back to the light or ceiling box is coming through the 14-3 and would be or indicates there was a either ceiling fan here previously (using the wrong type of electrical box) or that it was wired for one (ceiling fan box would've or should've replaced the standard box).
In a ceiling fan setup, the 14-3's black would be powering the fan and the red would power the ceiling fan's light (based on picture below). I'm hesitant to include a picture, since I couldn't find your exact setup and add to the confusion. But, the picture below is similar to your situation, however they skipped the 2nd 14-2 and just used the white to feed power to the switches...I agree much more with your setup.
I would expect there to be a capped black at the switch box and would like to see that 1 black disconnected and capped also in the ceiling box, if not being used. Though, that 3rd black could be going off to power something else with the switch box also being used as a junction box. Sorry, I can't be definitive without more pictures.