It would be impossible to count the number of times that people have shaken their fist up toward Heaven and said, “God! Why did you?” Don’t be confused, there is nothing wrong with asking God why bad things are happening, but there is something wrong with blaming God for the bad things that happen. Sin is the root of all our troubles, not God. Especially, and more to the point, our own sins. James said “13 Let no one say when he is tempted, “I am tempted by God”; for God cannot be tempted by evil, nor does He Himself tempt anyone. 14 But each one is tempted when he is drawn away by his own desires and enticed. 15 Then, when desire has conceived, it gives birth to sin; and sin, when it is full-grown, brings forth death.” (James 1:13-15).
It is our nature to cast blame on others, but when we do, we really harm ourselves more. It is always good advice to look into the perfect law of liberty and examine ourselves first before we think of blaming others for our troubles.