If men are saying this, it may be because the cost of the divorce can be really high. She takes half your stuff. If you have kids, chances are in some states she gets primary custody and the legal system sets an amount you have to provide for your kids, a budgetary constraint that can make it difficult if a man's income drops or if he wants a lower-paying job to be close to his children.
Men who say this may not realize the child support thing can happen if they are married or not, so it is not, so it is an argument against having children, maybe, and being able to be identified as the father. But it is immoral not to support your children.
This is the reasoning of some unbelieving men, at least. From a profit-maximization perspective, it kind of makes sense. But as Christians, we know that there are more important things than money.
All this is an argument against a man marrying a woman with a worldly attitude toward marriage, who will leave if the marriage isn't satisfying or interesting enough or if she finds a man she likes better. Men can leave women, too, but they tend to face the financial penalties for it, in the US at least, moreso than the other way around.
But if this is a man's reasoning, he might not say all that to his live-in girlfriend.
Christian men should not have live-in girlfriends, unmarried sex partners.
I remember a high school and church friend of mine getting married. The family made some of the food, and I think it was more of a pot luck. We could change our church culture to help out with food, having pot luck dinners for weddings without it having to be a fancy affair. I went to a predominantly Filippino church where an unmarried couple with kids started attending. I didn't know they weren't married. My wife found out and started talking to the wife about needing to get married. The pastor did, too. They had a wedding. I think people may have helped them with food. They didn't have a lot of money.
The family, extended family and such, preparing food could also be a lot cheaper than hiring caterers.
A lot of my relatives just had some light snacks at their weddings in the 1980's. My cousin married a woman whose dad went all out. I remember a spread of food, caterers walking around with plates of cocktail shrimp, all hosted in a country club. It's not cheap. In Indonesia, there is an expectation of a big party, and I have been to a number of weddings at hotels with great buffets, including the popular kambling guling (roast goat) stand that you can almost only get at weddings. But I've seen poorer families serve homemade food in the street for weddings.
My mom said when she was young, the preacher would just marry people right after the Sunday service. I can't remember, but maybe there was some food in the fellowship hall afterward. That was the norm, except some couples drove off to the justice of the peace in the next state over to not have to pay for the blood test.
My wife and I fed a couple of hundred people for our wedding in her country, then my parents put on a party for family at our house. Some of my wife's relatives thought we needed to do the traditional ceremony, so we had another adat ceremony in her father's ancestrial village, in the yard between the houses in the village, sitting on the ground until my muscles were fatigued. I didn't understand the local language, there, or what they were saying, and got just a bit of translation. It mostly involved sitting around talking and eating food.