In the UK any child born in wedlock is presumed in law to have been fathered by the husband and is entitled to be supported by the husband and inherit.
In Victorian times, outside marriage, a man could deny being the father and the child would have no claim.
Today of course it is easy to prove or disprove paternity.
Going back in history, though, the child was the responsibility of the father even if the parents weren't married under The Poor Law of 1733 - this was to reduce the burden on Parish Relief, public funds used to relieve poverty. Any father refusing to support his illegitimate child could be sent to prison.
This changed in The Bastardy Clause in the New Poor Law of 1834 which made illegitimate the responsibility of the mother until the child was 16. If she couldn't support the child it was the workhouse.
So rather than moral values it was money that channelled the attitudes of the time. This is a good read if you are interested:
http://people.loyno.edu/~history/journal/1989-0/haller.htm