In one of the works we were studying, Rambam cites the Babylonian Talmud, Tractate Sotah 14a,
Rav Hama son of Rav Hanina said: "After the Lord your God shall you walk" (Deuteronomy 13:5). But is it possible to walk right behind the Presence? . . . what the verse means is that you are to follow the ways of the Holy One. He clothed the naked: "The Lord God made for Adam and for his wife garments of skin and clothed them" (Genesis 3:21). So should you clothe the naked. The Holy One visited the sick: "The Lord appeared unto him in the terebinths of Mamre" (Genesis 18:1). So should you visit the sick. The Holy One buried the dead: "He buried Moses in the valley" (Deuteronomy 34:6). So should you bury the dead. The Holy One comforted mourners: "And it came to pass after the death of Abraham that God bestowed blessing upon Isaac his son" (Genesis 25:11). So should you comfort mourners.
This led me to ask a perennial question of mine, for which I had not yet received a satisfactory answer. Imagine, I said, Rambam's evil twin. He also thinks we should walk in Hashem's ways. He cites the Mirror Mirror Universe Babylonian Talmud
. . . what the verse means is that you are to follow the ways of the Holy One. He destroyed cities full of sinners: " God made sulphur and fire rain down on Sodom and Gomorrah - it came from God, out of the sky. He overturned these cities along with the entire plain, [destroying] everyone who lived in the cities and [all] that was growing from the ground." (Genesis 19:24-25) God declares wars that last forever "God shall be at war with Amalek for all generations" (Exodus 17:16) - So should we war with out enemies until we exterminate them. The Holy One punished complaints with plague: "Moses then said to Aaron, 'Take the fire pan and place on it some fire from the altar. Divine wrath is coming forth from God. The plague has already begun!'" (Numbers 17:11) So should you punish those who complain.
Why do we follow the first set of examples and not the second?
The class and the teacher discussed this for a while. Here's the answer we came up with, which was primarily inspired by Ms. Susan H.:
Hashem is altogether good. Even those acts of Hashem which appear evil to us are actually good, we simply don't understand the reasons why this is so. We are obligated to walk in the ways of Hashem. We understand why the plainly good acts Hashem does are good, so we imitate them. Since we don't understand why the apparently evil acts Hashem performs are good, we do not imitate them, because otherwise thinking to do good we may do actual evil.