Child before marriage?

Just curious why people have kids first before getting married? Like in my town it's considered a taboo. People see it as stupidity. I just don't understand why people would want a child first with a guy they didn't marry yet I mean guys can still leave after marriage but still, marriage is marriage. It has it's benefits and assurance. Why do it?