In every employment situation, the employee’s talents or productivity (whether proven or merely perceived by management) must outweigh their liabilities (whether proven or merely perceived by management).
If not, they aren’t employees anymore. Or never became one in the first place.
It could be salary. It could be demeanor. It could be nearly anything, employers can value different things. There is always a sliding scale.
If you’re the best at the company and worked without incident for a decade, you can probably show up late one morning and not get fired. If you’re the worst and have attitude problems, among other things, then you might be gone.