It was because you were married. A child born during a marriage is automatically the legal child of both married persons.
I am rather amazed that you were able to divorce without addressing child custody and parenting time.
I filed the divorce without a lawyer. If you are not dividing property or deciding custody issues, you can file without a lawyer where I'm from and pay only the filing fees and court costs totaling around $250. They even offer a free clinic to help you complete the forms. This would only be for an uncontested divorce, of course. I had to wait about 3 years before he would not contest.
Even when I consulted a lawyer, he quoted one price for a straight forward, uncontested divorce (minimum costs assuming there were no changes or surprises during the process - about 10x what I paid to do it myself.) and another price if we wanted to have a custody agreement. He said without one, the status quo would remain until one or the other parties was no longer happy with it and filed for custody. I can't remember his exact words, but I understood that without a decree stating otherwise, whoever had primary physical custody basically had full custody with the understanding that if you didn't want your arrangements to change, you should cooperate with the non-custodial parent. This only applied to physical custody. Legal custody is 50/50. I couldn't have gotten a better custody arrangement than the one I had, at least from my perspective, so I left well enough alone.
I could have requested child support at any time, but something told me I may one day need to say he had never contributed a cent. It was probably a matter of pride on my part as well. Also, as I discovered about the time we stopped pretending to make the marriage work, he had children in his home country and they needed his money more than my child did.