It appears only when there's a line in the photo that the editing software thinks should be horizontal. It will automatically rotate the photo to make the line horizontal. In your screenshot, it's the shelf that the bird houses are on. If you tap on auto, the photo will revert to the original composition. Tap the reset button that appears and the line will become horizontal.
When you tap on auto and reset in rapid succession, you can see exactly how much rotation was done to straighten that shelf.
Here's a photo in my photos app that shows the same thing.