I work at one of the two mentioned companies. 20% of the employees do 80% of the work, and another 60% do maybe 50%. the last 20% account for -30%. It's demoralizing how incapable management seems to be at jettisoning the chaf, however it was explained to me once thusly: good engineers are hard to find and also very valuable. An unmotivated/lazy engineer is one step away from being a valuable engineer. It's worthwhile spending a lot of effort trying to find what motivates them.
Also, if you look at revenue and divide by employees, you will see that the strategy of "employee 5 engineers and hope at least one is good" is still profitable.