why multiply grayscale images by 256
Grayscale images are typically stored as 8 bits per pixel in files. Perhaps the network was trained to work with such data. $2^8 = 256,$ so 8 bits can represent any number from 0 to 255. It may well be that the author was converting from range $[0, 1]$ to $[0, 255]$. Note that $0.8681 - (-0.1319) = 1.$ Multiplying by 255 to stay within the range would have been more appropriate, but multiplying by 256 is appealing because it does not introduce any rounding error in finite precision floating point arithmetic.

Subtracting the mean does not change the story as it can be equivalently done before or after the multiplication.