Came across an interesting fact about illegitimacy the other day. It concerned the Legitimacy Act of 1926 (effective from 1st January 1927), which stated that the subsequent marriage of an illegitimate child's parents legitimised the child's birth - provided that the parents would have been free to marry when the child was born (i.e. neither was married to a third party).
By close examination of the wording of the Act itself (here), it is clear that this not only applied to children born after the 1st January 1927, but also to children alive at the time who would have previously been considered to have been illegitimate ... provided that their parents did at some point marry after their birth, of course. When this occurred, in theory at least, the legitimised birth was re-entered in the birth indexes for that year - sometimes many years after the original birth, of course. The original entry would be annotated, too.
So, little Johnny born outside of wedlock in 1915, his parents marry in 1920, Act passed, and little Johnny is legitimised from 1st January 1927 (and not from 1920). However, big Bertha born outside of wedlock in 1932, parents marry in 1936, so big Bertha legitimised from 1936.
It should be noted that those born illegitimately prior to the Act and who also died prior to the Act, remained officially illegitimate no matter what their parents did, marriage-wise.
The Act was introduced primarily to deal with inheritance issues, and was amended most notably in 1959 which extended the legitmisation process to children whose parent(s) had been married to somebody else when they were born (and therefore not able to marry each other at the time) but married later on - in other words, children of adulterers.
There. Now you know. Finding this out means that both my own father and grandfather, who both entered this world before their parents' respective marriages, had their births legitimised by subsequent events. No scandal there then (ahem).