If you're using a highConsider this example from Cambridge in Colour:
By applying gamma encoding, we are able to represent the original image more accurately, with the same bit depth, like 16 bits per channel (not pixel), gamma doesn't matter5, since it's a reversible transformationin this example).
But, if you'reThis is achieved by using the 32 levels in a limited depthway that more closely corresponds to the human eye. In other words, like 8 bits per channelit's a form of compression. JPEGs, then gamma-encoding lets youfor example, can actually store around 11 stops of dynamic range despite using only 8 bits per channel.
And like any other form of compression, it doesn't matter if you don't care about file size (and the lower speed with which you can read or write larger files). You could, in theory, use a nominally 8JPEG-bitlike format that used linear gamma, if you were willing to allocate 11 bits to each channel rather than 8.
So, to summarize, gamma is just a form of compression: it reduces the file size needed to store a certain amount of information as the eye perceives it. Alternatively, it lets you store more subtle gradations in the same bit depth.