Much the same way any employer can afford to pay good wages and provide benefits for all employees.
Any employer who can't pay market wages will soon be out of business. Indeed, four out of five businesses fail within the first five years of opening.
The agreement that an employer and employee make as to wages and benefits is their business and no one else's. Employers who pay fair wages and benefits will always have employees willing to work for them. Employees who have job skills and are willing to work hard will always find a job at a decent level of pay.
Ain't capitalism grand?