Things happen to help you get rid of the parts of yourself that aren't you; to help you be more real and more yourself, not like everyone else; to help you lead a more authentic life; and ultimately to help you discover who you really are.
A mind that is always comparing, always measuring, will always engender illusion. If I am measuring myself against you, who are clever, more intelligent, I am struggling to be like you and I am denying myself as I am. I am creating an illusion.