In my opinion, sometimes bad things happen, not because we are receiving payback for some undefined evil we did in our past but just so we may learn some valuable lessons that are essential for our further growth and development.
So while I don't think that this is a mistake, I also don't believe the universe is punishing you. I think you should embrace the lessons embedded in this event and see it as an opportunity for growth. All the best!