Rabbi Yehuda Leib Graubart zzl, points out that this supposed children’s song is actually a very deep piece.
The goat is good. And all is good. Until a cat comes a long and eats the goat. Because he ate this good, innocent goat, the cat is bad. So a dog comes along and eats the bad cat. According to logic, the dog is good. Then a stick comes along and beats the good dog. This stick is obviously… Bad. Fire burns the stick, good. Water puts out the fire, bad. Ox drinks the water, good. Slaughterer slaughters the ox, bad. Angel of death kills the slaughterer, good. HaKodesh Baruch Hu kills the angel of death… Bad. (G-d forbid.) And one must ask the question, how does G-d turn out to be bad?
And Rav Graubart answers the question by pointing out that when the dog ate the cat, this act wasn’t good. The dog ate the cat because that’s what dogs do. The dog wasn’t good. The dog was a dog. Similarly, Paro wasn’t good for doing the seemingly good things that he did. Paro was just being Paro. Any good that came from Paro’s actions was merely happenstance. The dog, Paro, and so many others. The good, all good, comes from G-d.