Can pasteurized milk turn into yogurt by itself?
What you got is more properly characterized as buttermilk (in the current usage of the term) than yogurt. Pasteurization does not sterilize milk, and it can have been any kind of bacteria which can survive in milk. The process was the same as in any other cultured dairy: bacteria started multiplying, producing lactic acid which curdled and soured the milk. 

The harsher the pasteurization, the less chance that you happened to have an abundance of a benign culture. You could have gotten something dangerous, or harmless-but-gross. Traditional buttermilk making by leaving raw milk unseeded with any culture out and hoping that it harbors no baddies is also unsafe by today's standards. So, if you want to produce buttermilk or yogurt, you are much better off starting with a culture. A few spoonfulls of prepared yogurt or buttermilk should work (unless their culture was killed), but for best results, you should match culture and fermentation temperature.