That's one way that they work. Sometimes. Sort of. There are other (better) ways to control fan speed other than "controlling voltage".
Also, there are multiple approaches to "controlling voltage". Some are better than others. For this specific situation, the cheaper version (3-pin PWM) will work best.