This question has already been answered here on eNotes. Here is a link for you: http://www.enotes.com/epic-gilgamesh/q-and-a/what-main-idea-epic-gilgamesh-142625
I think that one of the main ideas of The Epic of Gilgamesh surrounds the journey of the hero with a specific purpose. The heroic journey is a critical idea in Gilgamesh's narrative. In Gilgamesh's case, the journey reveals aspects of his own identity and the need to right a wrong. This is something that becomes integral to the heroic myth, in that there has to be some type of journey to reveal change on both external and internal levels. Gilgamesh journeys to discover his own true identity and that of mortality. He journeys to avenge the death of Enkidu. Moreover, he journeys in order to struggle and to understand the nature of struggle in the individual. One of the critical ideas to come out out of The Epic of Gilgamesh is this idea of how the journey changes us. In some respects, Gilgamesh might have been arrogant enough to think that he can change the journey. His belief in his own power, strength, and being leads him to this. Yet, in the end, it is the journey that changes him. Gilgamesh comes to a more profound understanding of self and this only happens as a result of the journey.
That a king's worth is not measured by war mongering or "heroic feats", but by acquiring wisdom, honouring the gods, and leaving a more lasting legacy of civic achievements on behalf of his people.