I briefly worked in offensive security at somewhere you may consider to fit the bill of “places like this” - people do it because it’s fun interesting and rewarding work. The pay is good too, but the fact that you just develop the exploits and don’t Push The Button(tm) really provides more mental space than you’d think.