What is your point? Would it not have been better to at least try to make the child legitimate? If the marriage had then failed, how would that have been worse?
How does a paper marriage make you better parents? It doesn’t.