NewGRF only has integer numbers, so there is nothing between 0 and 1 (or 1 and 2, etc).
Suppose you want some numbers between them anyway, what to do?
The trick is (in the decimal system), multiply by 10. Thus 0 -> 0, and 1 -> 10, and 2 -> 20, etc.
'Suddenly', I have 1, 2, 3, .. 9 between 0 and 10 (corresponding with 0.1, 0.2, .. 0.9), yet I still use integer numbers only. You can add, subtract, and even multiply (with a bit of care) in this integer world, and it all works as expected. Eg 2 + 18 (0.2 + 1.

So how to get back to the original 0, 1, 2 values (which have become 0, 10, 20, etc)? That's also easy, just / 10 (the reverse operation of multiply by 10). Obviously, there are some rounding problems that need to be taken care of here, you may want to add 5 (0.5) before dividing.
In NewGRF you can do the same trick, except multiplying and dividing by 10 is much slower than using a power of 2. There is nothing against using 1 << 21 as multiplication factor, which gives you more than 6 digits precision, namely the lowest 21 bits become the fraction (much like the last decimal was the fraction in my decimal example). / (1 << 21) then means drop the lowest 21 bits, or go back to the value without the fraction.
Edit: Why 21 bits? no idea, but given that an integer is 32 bit (31 if you don't want sign trouble), so maybe the author of the code had 10 bits in the original integer world, and decided he wanted as much fraction as possible?