Obviously it has to do with devices orientation.
Holding the device so the lens is in the upper left corner should eliminate it.
When you rotate the device there are two ways to get compensation.
1) The device processes the image to the correct orientation relative to the device
2) Tag the EFIX data with orientation info
Apple uses option 2 because option 1 requires more from the device which means the camera is not available for the next shot as fast and it also decreases battery life.
The problem with option 2 is lazy developers that don't account for reading EFIX data so photos can be presented in the proper orientation.
You can get a 3rd party camera app which will process using option 1.
https://itunes.apple.com/us/app/camera+/id329670577?mt=8&ign-mpt=uo%3D8