Quite simple.

0.5 = Faster encoding and larger files.
8 = Slower encoding and smaller files.
There are options because we have different requirements and preferences. Some want the maximum compression regardless of encoding time, while others want fast encoding time and don't care that much about file size.