iPhone stores sideways photos with the orientation in the exif data. I've no idea why they choose to do this, but it causes a problem based off where you're sending the photo. Uploading the raw file for example to CB isn't going to process that orientation as it doesn't have a clue it exists; nor do we process exif data. As I've no apple device I will have no way to test PHP workarounds for detecting exif orientation. Looks like the image processing library Imagine that we're using has a possible fix for this though.
github.com/avalanche123/Imagine/pull/318
Will review applying usage of autorotate usage in our image API, which should allow it to globally apply to all image upload usages throughout CB. For now I do not have a workaround, sorry.
forge.joomlapolis.com/issues/6151
Note you'll see this issue for example if you email an apple photo, etc.. It appears apple always stores landscape orientated. Even if you take a portrait it's stored landscape and thus will be sideways.