Feb 6, 2012
commented on It May Be (Unusually) Warm in Seattle Right Now, But It's Negative One Million Degrees in Eastern Europe
It used to be that each time you took a picture with an iPhone, the phone corrected the orientation as it was saving. That takes a lot of number crunching, so in an effort to speed it up they changed it so it saves the picture sideways (or upside-down, or however you took it) and throws a tag in the picture's metadata that says, "by the way, this picture should be viewed rotated 90 degrees to the right" (or whatever the correction needs to be).
Your mac knows how to read that tag, which is why it looks right when you're looking at it at your desk, but once it flies out onto the internet that tag is lost, and that's why sideways pictures.