Notice it does not say, "You do what is good, therefore God is good." God is not good because of what He does. God is good because good is what God is. God does out of what He is; His doing comes out of His being. Because He is good He does good. God's nature is good, therefore it would be impossible for God not to do good.
"But wait a minute," you say. "If God is good then why does He allow bad things to happen?" Bad stuff does happen to us. We cannot say that losing a spouse is "good," or being abused is "good," or divorce is "good." Some things are just bad, and they definitely happen to us. God is sovereign. Nothing happens without God's approval. Everything that happens is part of God's plan. So if God allows bad to happen, then how can God be good?
I think part of the problem is in how we define "good." What is good? Honesty, I think we would define "good" as anything that makes us happy, healthy, fulfilled, prosperous, successful, powerful, respected, admired, etc. Whatever we want is good.
But what is "good"... really? Is getting what we want good? What if we want revenge? We can regret getting what we want. And sometimes getting what we want does not make us happy.
So does God have a different definition of "good" than we do?
In Genesis we read
From this verse we could say that "good" is all that God makes. God made sharks, so sharks are good. God made fleas, so fleas are good. God made spiders, so spiders are good. God made snakes, so snakes are good. We might say, "Spiders are bad." But God made spiders, so spiders must be good. I might hate snakes, but my feelings about snakes does not change the fact that snakes were created by God and everything God created is good.
In Romans Paul writes:
Here is a biblical definition of "good": Good is anything that makes us more like Jesus. Sometimes the things that make us more like Jesus are not the things we would call "good." Our problem is perspective. Now we see "through a glass, darkly" (1 Corinthians 13:12). It is hard to see clearly through the mists of pain and difficulty. But one day God will lift us high above the fog of hurt and hardship. Then we will see "face to face"--with complete clarity. We will understand that God's was purpose was pure and His product was perfect. Then we will see the complete picture... and our shout will be "God is good and everything He does is good!"