The goal is to turn something that would otherwise cause you distress into a tool of your own happiness. When something bad happens to you seek a legitimate reason of why it's a sign of something positive in your life.
The idea that we try to optimize happiness in the sense you imply is a simplification. Blissful ignorance provides happiness, but most people don't consider it a worthy goal. Yet this suggestion is basically "try to achieve blissful ignorance, rather than not liking bad things". It does not follow that because X is not possible without Y, and Y is good, therefore X is good. Trying to believe that X is good on these grounds is some variation of willful blindness and blissful ignorance.
Another month has passed and here is a new rationality quotes thread. The usual rules are: