When you rotate an image in your phone or on your computer (by right-clicking or going into the image options and selecting “Rotate Right” or w/e), the device is not editing the image to rotate it 90 degrees. It’s just adding a little metadata tag that tells devices loading the image “display this, but rotate it 90 degrees”.
That depends on the software you’re using. Some edit metadata, some rotate the image itself.