Psychopath is being used in a colloquial way here and not an exact diagnosis. Even if they are actual psychopaths they are known for being very charismatic and there are a lot of sadomasochistic people in the world who are motivated by punishment.
Further the people who work directly for these people want to be them, so they see it as just part of the process.
Another factor is money, it’s a motivator. Those who work lower down the org chart can often be desperate, struggling to get by and get used to the punishment, convincing themselves that it would be worse elsewhere.
The Idea that life is short and work just isn’t worth it comes from a place of privilege and the luxury of time for self reflection. Something not everyone can afford when one lives in survival mode.
Tech companies are operated like any other company and have a wide range of employees. Also not every tech position is highly employable. I know from personal experience in tech middle management that many employees are very easy to replace and have very common skill sets that are oversaturated in the market. Many many tech workers are absolutely operating in survival mode in 2024.