Why would an irregular cycle cause miscarriage?

Laura • 4 miscarriages, one living child, pregnant again.

Back story: I have had two early miscarriages (July 2018, Feb 2019). My cycle has always been irregular and since ttc in Aug 2017 it ranges from 35-48 days. Today when I saw the specialist he said my difficulty is likely result of me not ovulating correctly and I will have a series of bloodwork done to confirm his suspicion.

My question is I clearly ovulate sometimes... and I did get pregnant twice. Why would irregular menstruation cause miscarriages? I didnt think of the question until after I left. I was just happy to have a plan of action.