The Olympics in Ancient Greece were dedicated to the Gods for entertainment purposes. The Olympics nowadays has a rough history. Originally played to pay a certain homage to the past Olympic games nations came together to play in the games. After that I want to say that we continued playing the games in order to promote peace between the nations in a healthy way.
Hope this helps!