We get exactly the experience we need to have by having; either a new lesson to learn or a coming-around again of something we missed.
You will always get what you need, not necessarily what you want.
THIS is the school of hard knocks, right here on earth... this is what you are here for, to learn and grow. So there WILL be lessons. Not getting what you want, could be just what you need. You are not being punished when you don't get what you want, in fact it may be the best thing that ever happened to you. You are being guided to what you really need to enhance your growth.
If you are receiving the same lesson over and over, or the same type of person keeps coming into your life, it is time to reflect. There is something you are not understanding and you WILL keep repeating the lesson until you get it.
You may wonder why the universe won't just relieve your pain and give you what you want. You are a nice person don't you deserve whatever it may be that you want? Of course you do, but if that isn't taking place, you have unlocked a lesson. The Universe is here to help you, to assist you at all times, but this is about YOU. If your problems were all fixed for you, you wouldn't learn anything at all, which defeats the whole purpose of your existence.
To quote the Rolling Stones:
"You can't always get what you want
But if you try, sometimes you just might find
You just might find
You get what you need."