Ultimately, you don’t have to understand what it does other than you pass in a compressed normal map (texture tagged as normal map in the inspector) and you get out a proper normal map.
Also note that the motivation for using only two components in OpenGL is somewhat different from what Farfarer has described: in OpenGL Unity might use a two-component texture which actually offers only two components A and a color component, which can be accessed as R, G, or B.
I wasn’t aware of it, but apparently OpenGL 4 supports its own compression format (see appendix C in the specification: http://www.opengl.org/registry/doc/glspec42.core.20110808.pdf ). In OpenGL ES the supported compression formats depend on the GPU.
However, in OpenGL you can always ask for a two-component texture format with (for example) 8 bits per component. Thus, the driver could use, for example, 2*8=16 bits per texel. In that case, you have to store one of the components in the alpha channel and therefore you have to do some swizzling, too. Thus, I wasn’t surprised to see it.
DXT gets 5:6:5 for R:G:B
DXT5 is 5:6:5:8 for R:G:B:A
So with DXT5, only the alpha channel remains uncompressed (hence the swizzling with the normal map - uses the G and A channels because they’re least compressed).
Apart from http://tech-artists.org/wiki/Normal_map_compression, all these references make it clear that 16(!) 8-bits alpha values are interpolated from just 2(!) 8-bits alpha values (with only 8 different linear combinations). This is not exactly uncompressed.
Oh, it’s definitely compressed, it just doesn’t use bit reduction and stays at 8 bits, unlike the RGB channels which are reduced to 5/6/5 respectively.