Of course companies who are doing well can also afford to pay more and give all sorts of perks to their employees.
I suspect often that is the actual causation, not vice versa. People like to point at successful companies and say "see, if you would treat your employees like that, you would be just as successful". That seems a bit silly.