Sorry to hear you had to undergo a second surgery.
As far as I understand, the medical community has no definite conclusions to why the membrane grows, but it is believed it is somewhat a "scar tissue" that forms from the body thinking it needs to protect itself from the retinal damage.
In my particular case, I have a extremely rare case of retinosis pigmentosa, which is a genetic birth malformation of the photorecepctor cells, it primarily affects rod cells (low light / contrast vision) and leads to a progressive loss of such cells, leading to a progressive loss of night vision with age. In my case, I have a really bad night vision for all I can remember but it seems my variant is a constant one, it does not get worse with age (it already started bad lol). That said, while everyone is liable to randomly getting a epiretineal membrane spontaneously growing in their eye (even without a retinal tear), those with retinosis pigmentosa have a much higher risk :c