The company has a number of motivations behind these "employee friendly" policies:
Attracting talented workers: The company is in competition with other companies to attract good workers. By offering employee friendly policies, the company hopes that highly talented workers would want to work for them.
Increase profits by boosting employee morale: Employee friendly policies boost employee morale. Happy employees tend to be more productive and dedicated to their jobs, which increases the company's profits.
Reducing employee turnover and associated costs: Closely related to point 1, employees tend to leave companies having unfriendly policies. Employee turnover costs the company by way of exit procedures, posting job advertisements, recruiter fees, setting up interviews, onboarding procedures, training the new recruits to bring them up to speed, etc.
About your specific example of early vesting of retirement funds, the reason is somewhat counter-intuitive. Employees tend to resent employers who make it difficult to leave and usually take an earlier opportunity to leave, whereas they feel "empowered" if the employer doesn't put hurdles in their path, and stick around longer.
In summary, every so-called employee friendly policy is actually employer friendly. Companies are out there to do business, business takes precedence over everything else. "Employee friendly" policies are just yet another business tactic.