Right angles behave differently from odd ones
Rotating by 90, 180 or 270 degrees is exact and lossless in shape; any other angle has to redraw the image.
At a right angle every pixel simply moves to a new position, and for 90 or 270 the width and height swap over, so a landscape photo becomes portrait. At an angle like 30 degrees the picture no longer fits a rectangle, so it is redrawn onto a larger canvas with the corners filled in, and edges are smoothed rather than kept pixel-perfect. Use right angles wherever they will do, and reserve free angles for straightening a crooked scan.