From sipa on IRC (2023-01-06):
jamesob: In all probability dumb query, however why does
uint256::ToString()(->HexStr()) print out the blob in reversed byte order?sipa: As a result of that is what it has at all times finished, actually.
sipa: And folks anticipate txids and block hashes in hex notation to be reserved.
sipa: Traditionally, that was as a result of txids/block hashes have been 256-bit numbers constructed by deciphering the double-sha256 output as a little-endian integer, after which printing it out for human consumption in hex (the place people anticipate numbers in large endian).
sipa: However now uint256 is only a byte array wrapper, the habits is maintained as a result of block hashes and txids are at all times printed in reverse.
sipa: (block hashes are nonetheless interpreted a little-endian numbers for the aim of evaluating PoW to the goal, however that is dealt with by the arith_uint256 class now)
