John didn't have to marry her. How many men impregnate women and never marry them even back then? Look up Bettina Derlien and read her tragic story.
Contrary to popular opinion, John's life with Cynthia was far from miserable. Niether of these marriages were black and white, but when you really look at them closely, John's life wasn't as happy with Yoko as we think. He really did love Cynthia.
Why should the man have been miserable with a woman he had to marry instead of his soul mate who gave him great happiness.