IMHO, based on experience (my husband’s), marrying solely because you have a child together is probably one of the WORST reasons to get married.
Eventually your child will grow up and will need you less. Even as he gets older, he’ll become more and more independent even before he gets out of the house. When he gets to be a teenager, and older, what’s holding your marriage together?
There is also the possibility, though we pray it would never occur, that something should happen to him. If he’s not in the picture anymore, what’s holding your marriage together?
My husband originally married a woman who he realizes with retrospect he should not have married. The only positive things to come out of that relationship were his daughter, and the opportunity to meet me (Hubby emigrated from another country to be with his ex; I am from the same country as his ex and we live here together.) They married because they were pregnant, and the marriage lasted just over four years. It’s been more than 10 years now since they split up, and his ex STILL has a lot of anger towards him.
(For the record: his first marriage was investigated and he received a declaration of nullity. We are sacramentally married.)