There's always someone who is richer, stronger, more successful than you are. (OK sometimes you have to look a long way but you know what I mean).
We can come to terms with that kind of comparison but it can be a lot harder if/when we think we are entitled to more than we actually get. It's tougher still when we get all the rough stuff despite trying our best to get it right … and then the bad guys get all the good breaks.
The fact that the wicked prosper did not escape the attention of David or the other authors of the Psalms. For them, it was matter of being content with what God had given them rather than focusing on what they hadn't got.