There’s a mashal of someone who was throwing coins and bills off a high building because he wanted attention. But everyone was looking down to collect the money, and no one was looking up at him. So he began throwing stones, and finally everyone looked up to see who was throwing the stones.
This is people’s nature to recognize Hashem when there are hardships, but not when everything is good. ~ R’ Elimelech Biderman Shlita