The reason is because people who thank god when good things happen to them, are insinuating that God can control the bad things that happen to people. He is omnipotent and omniscient after all. You are at least insinuating that he helps some people, but chooses not to help other people (whether it be a test or whatever).
Much like ShoelessTroy says, I blame God for nothing. I thank God for nothing. God does not exist for me. When something good in my life happens it means all that much more to me that it happened because of my hard work or the people around me that care for me, not because some imaginary being that I cannot see or hear just decided to help me this day and not the other hundreds of times that I really needed him.
The reason we even say anything is terrible things happen to so many people, people were truly devastated by this tornado, then some sweet woman finds her dog (a heartwarming story) and it's cheapened by people saying "god is truly great". Well good for her and her dog, but her house is still destroyed. Two dozen people still died. Millions of people are still dying of cancer or aids or dictators or so many other reasons. What about them? Oh so you found your dog and therefore god is great. Glad he decided to help someone today. Sometimes we should just enjoy the good times when they are here, Zydeco pas sale, because bad things are always on the horizon and there is nothing that the christian, muslim, jewish, hindu, etc. God/Gods can do to stop it. I'd rather believe in humanity.