And it's a consequence of making divorce legal and socially acceptable. Traditional marriage was primarily an economic contract. The wife assumed the responsibility for running the household, and the husband had a lifetime obligation to support her.
But if you stay away from paid work long enough, your ability to get a decent job diminishes. If you want to make being a stay-at-home partner a viable choice in a society, where divorce is available, you need a safety net of some kind. Maybe the working partner has to continue supporting their ex after divorce, regardless of what led to it. Or maybe we socialize the responsibility, meaning higher taxes and welfare benefits.