When a shirt falls from a high place, there are some people who say, "I am grateful I was not in that shirt." At first glance, this seems like a very odd thing to say. But after some thought we can see it makes sense. Human beings are susceptible to all sorts of diseases and accidents. Many things can harm a person. Even a person walking on solid ground can trip and break a limb. Someone could choke on his food. With imagination you can picture events that have remote possibilities of actually happening.
A wise person is constantly aware of his lack of power to protect himself and realizes how easily he can be harmed. When he observes something falling, he is immediately aware that he could easily fall down, too. This serves as a reminder that he should be grateful to the Almighty for guarding him and keeping him alive. The main desire of each and every person is to live a life of happiness. This is the underlying motivation behind diversions such as games and music. Why should the art of feeling joy that potential harm did not happen be less than the art of enjoying music? The person who can feel joy because he is not ill or injured lives a happy life.
(see Chochmah Umussar, vol.2, p.73; Gateway to Happiness, pp.39-40)