It sounds like you had a regular period in May (to reflect what happened in your April hormone levels) and that you missed your June period and then got a period in July, correct? If that is the case, then you likely didn’t ovulate in your May cycle which means your body only made Estradiol which grows a lining. After 2wks, your body normally ovulates (d14 of your cycle) and you start to make Progesterone which peaks 1wk later on d21 of cycle and then if you are not pregnant on d21, your body starts to drop Progesterone and by d28 the drop is big enough to trigger your menstrual bleed. That is what happens in a normal cycle; it reflects what happened the month before. So, when you skipped June and didn’t bleed until July, it is reflecting what happened in June. When you don’t ovulate, you do not make Progesterone (P4); P4 stabilizes and enriches a lining but prevents it from continuing to grow. So, when you do not ovulate you cannot stabilize the lining that the Estradiol is growing so it will bleed at unusual times and with no warning; and it can last longer because you built more lining to have to bleed out. The ovarian cyst at 2.5 x 2.2cm is actually a normal sized cyst; depending on the timing of your cycle, a cyst this size can be a follicular cyst that you will ovulate your egg from on d14 of your cycle. As you had this scan on d11 of your bleed, then it was likely this follicular cyst and it means that you will likely have your August cycle on time and with the appropriate number of days that you will bleed. So, what causes you to not ovulate? STRESS is the biggest reason; stress of any kind, whether physical stress, emotional stress or even financial stress. I highly recommend that you ask your doctor to check your hormone levels on d21 of your cycle which is when you peak both your Estradiol and P4 levels; it will give you a window into how your reproductive system is working for you that month. Remember, knowledge is power and it’s important to know how your body works. I also highly encourage you to obtain a copy of my book, Blossoming, Becoming a Woman as it walks you through how your cycles work and what are some of the other signs and symptoms of hormone imbalance. Blossoming is available on Amazon. All women will have a cycle here and there where they don’t ovulate; but knowing how to recognize that puts you back in control of your health.
And to answer your other question, is this abnormal bleeding pattern related to an infection? Highly unlikely, based on what you described.