Beyond the surface-level pithiness of the joke, the point is that having money may not guarantee happiness, but it makes it a lot easier to distract oneself with viscerally pleasant experiences and engage in new hobbies that may in fact lead to genuine happiness.