Image rotation issues

Yes, the subsampling issue explains the behavior.

See also my note here:

The transcoding part of the JPEG Library handles odd dimensions in a different way and unfortunately does not provide supporting interface functions for the recompression option, so this approach is difficult to implement by application and easily messed up, especially for unsymmetrical parameters.

Another respective case which is over 20 years old:
SIGMA Photo Pro improved JPEG output
SIGMA Photo Pro improving JPEG output

There is also some sample code.
But as said, for transcoding with recompression application, you would want an automatic parameter copying and adjustment procedure with more implementation effort.

Regards
Guido
JPEG developer