Never understood it really, personally I find it super annoying, cap under a helmet makes my head too hot, and limits vision if you actually wear your helmet properly.
I imagine the pros are riding fast enough most of the time for sweat to wick off fast, especially on the flat.
Why is nobody wearing a cap or headband under their helmet, to stop sweat getting in their eyes?