This type of law isn't unique to Texas, coast to coast you can find similar cases like this.
Legally recognized as the child's father if at birth you are married to the child's mother --- so, if your wife is fucking some other guy(s) and later it turns out you aren't the father, it doesn't matter.
If unmarried and you sign the birth certificate, because well you think you are the father ---- you are now on the hook legally whether or not future DNA testing proves you aren't the father.
There is also "equitable paternity" -
you & the child's mother are in a close "family" relationship, such as living together.
You have been living as the kid is your own - such as claiming him as yours, financial support.
Varies from state to state, in some states this assumption of parenthood kicks in right away, other states have a specific time period in which you could still challenge the child's paternity and not be legally responsible for the child.
In some states involving married couples, paternity tests showing the husband is not the child's father have been blocked from being used in paternity tests - the husband assuming he was the father and acting as such overrides the subsequent dna testing showing he actually isn't the father.
Basically, the suspected father has to demand a DNA test at birth (or whenever he finds out he is the father) otherwise it will most likely be a legal nightmare. And I'm sure that will do wonders for many relationships - "Oh, honey what a cute baby. Now, let's test him to make sure he is mine."