When does Safari on iPhone change the text size when the orientation changes?
Here's an estimation:

The site you're likely viewing has what is called a liquid-layout, which means that the content will spread to fill it's container.  So when you're rotating the phone, the viewport width is changing from the narrower portrait width to the much longer landscape width.  So the text itself might not be changing size, the webpage is just adapting to fit it's new window size.

Luckily the above link also has a liquid-layout, so you can see this in action.  Take the window on your computer and shrink it's width.  You'll notice that the text will shift around to fit it's new container size.  So it's the web page (more specifically the CSS) which determins how the text wraps.

tl:dr

CSS did it.