Quite often marriages were more for convenience sake.John probably had no immediate family & was living in lodgings,Margaret would have had a harder time with a child & no husband & would have had to rely on family to survive or get married.There was a stigma attached to illegitimacy & being made "respectable" at least in the eyes of others would have been an attractive proposition even if it wasn't legalised.
I'm sure the "who do you think you are " team have had dead - ends as well but we don't see those.
William is your only hope at present.
Let us know how you get on.
jim