Much more than that they were actually a demonstration of warrior prowess for other nations to observe your best warriors. All of the original Olympics events were critical tasks for soldiers of the day (running, jumping, throwing spears and discus, wrestling). Later chariot racing and other MMA style fighting was added.
The idea being that nations could come together peacefully and show how powerful they were to avoid actual conflict. Of course if you showed up and made a weak showing you could expect to get dominated politically.