The author gives the details of Heracles’s and Gilgamesh’s interaction with the gods to show that

although the specific gods involved differed, the overall results were the same.
because the specific gods involved differed, the overall results were different.
because Heracles and Gilgamesh lived in different places, they experienced similar results.
although Heracles and Gilgamesh lived in different places, they experienced different results.