Why should someone be paid for adding nothing of value to a company (by being on maternity leave)?
Social good.
Where the state provides some or all of the financial assistance for parental leave, one could argue that it is already funded by all corporations, as it would be derived from tax income.
(And if every company were obligated to provide it, none would have a short-sighted competitive advantage over those who chose not to provide it.)