I'm posting this as food for thought, and because I don't see it suggested elsewhere:
Perhaps we're reading it wrong? The usual reading is that the gods are "unaffected by [hypothetical] anger [that they might otherwise feel] and [hypothetical] gratitude [that they might otherwise feel]."
Could it be credibly inferred that the anger and gratitude that the gods are immune to is our anger and gratitude?
It doesn't matter whether your words are "My God, my God, why have you forsaken me?" or "into thy hands I commend my spirit"; the result is the same. The gods, by virtue of being gods, are necessarily deaf to human griefs, as well as human joys.
Under this new reading, the first Principal Doctrine falls in line with the recurring literary devices that mark the whole series; the Chiasmus, and the Antimetabole. I can summarize a few examples, with the caveat that brevity is the mother of misinterpretation.
1. Do not trouble about the gods, for the gods do not trouble about you.
2. When we are, death has not come. When death has come, we are not.
3 and 4. What is good is easy to get, what is terrible is easy to endure.
5. It is not possible to live pleasantly without living [x], and it is not possible to live [x] without living pleasantly.
6. Take courage from other men, or at least from men who can give courage.
11. If suspicion of nature did not trouble us, we should not trouble to study nature.
I write these merely to isolate the main point--that the literary devices are constantly repeated, and are there for a reason.
From Wikipedia;
QuoteChiasmus derives its effectiveness from its symmetrical structure. The structural symmetry of the chiasmus imposes the impression upon the reader or listener that the entire argument has been accounted for.[13] In other words, chiasmus creates only two sides of an argument or idea for the listener to consider, and then leads the listener to favor one side of the argument.
As I say, food for thought. And thanks to my old copy of Walter Harding's edition of Walden for alerting me to these literary devices.
QuoteWhen my hoe tinkled against the stones, that music echoed to the woods and the sky, and was an accompaniment to my labor which yielded an instant and immeasurable crop. It was no longer beans that I hoed, nor I that hoed beans; and I remembered with as much pity as pride, if I remembered at all, my acquaintances who had gone to the city to attend the oratorios.
-Henry David Thoreau