Unfortunately biology doesn't treat everyone as equals. Women most often end up with the burden of raising the children. Marriage has a lot to do with making a commitment to stick around and help raise the kids.
Married or not, you can decide to take off at any time. And married or not, a man may be forced to pay for a kids - even if it's not his biological kid.