This is basically the lesson of the whole House of Atreus cycle in Greek mythology. And the story of Achilles in the Iliad. And all the stories of Zeus raping mortal women.
The gods are assholes, and there is nothing you can do about it. Have a nice day.
Well, Achilles was given a choice. What happened is, at least in part, his own fault.
In most of the nemesis stories, people don’t get in trouble for propitiating the wrong god; they get in trouble for not propitiating a god.
Agamemnon bragged about his hunting ability, and Diana got pissed.
Yes, sometimes there is blatant injustice: Arachne didn’t brag about her weaving; she merely wove very, very well. But in the vast majority of tales, the problem comes from bragging, snubbing, or, worst of all, trying to trick the gods.