Of course it is a law. Not that laws are always fair. And yes agreed, it happens both ways, but in most cases it is men who pay up.Yes, it's called the Family Law Act of 1985. They actually DO own 1/2. Because they were married to the guy.
But it works in reverse. The number of deadbeat men who pull the same grift on hard-working, smart successful women is legion.