The experiences we go through are used by God to teach us something. He is a God of intention and nothing that happens is ever in vain.