The iphone does internal flipping of the images and displays it to you on your phone correctly but internally the image is sideways or upside down. Then when you upload the upside down photo to ATP, it displays the actual way which is upside down.
I've been experimenting with automatically seeing that when images are upside down, etc, and fixing it automatically, but so far it's been a slow going process. We'll get it all fixed up eventually.