Under the scenario you propose, the husband would not be under obligation to pay child uspport, unless he legally adopted the child. Bad example.
It’s a very real scenario. It’s called “implied paternity” and it has been enforced.