The reason for 24 patterns is because the founder, General Choi Hong Hi, compared the life of man with a day in the life of the earth. He believes that people should strive to bequeath a good spiritual legacy to coming generations and in doing so gain immortality. Therefore if we can leave something behind for the welfare of mankind, maybe it will be the most important thing to happen in our lives, as the founder says:

Here I leave Tae Kwon-Do for mankind as a trace of a man of the late 20th century. The twenty four patterns represent twenty four hours, one day, or all of my life.