Marriage because of a baby?

My brother in law got married to his GF of less than a year because she got pregnant (she's Christian if that makes a difference). Now after a year of marriage they hate each other and are getting a divorce. How do you ladies feel about getting married just because of a baby? I'm just curious I don't mean to offend anyone.