A Matter of Perspective
Sometimes in life you do things that you wouldn't think you would do simply because it is necessary for a certain period of time. A prime example of this is Joseph. He was sold into slavery by his brothers because they were so jealous of him. And he even ended up in jail through no fault of his own. However everywhere he went, even prison, God blessed him until he one day became second in command to only Pharaoh when Egypt and the rest of the world were going through a famine.
Why does God show unmerited favor to certain people? It's because he sees the heart and he knows who really love him. However that doesn't mean that life is all roses even then. We all go through good and bad but God will turn the bad to our good if we love him. Do you love him?