In ancient Mesoamerica (as well as ancient Egypt) there was no division of religion and politics as we see today. Their rulers and priests were intertwined and drew their authority from the gods and the whole society was permeated by their religion.
The common themes of Mesoamerican mythology is duality, death and the underworld, a multitude of gods and goddesses with different functions and manifestations, sacrifice, cyclical time and the progression of creation episodes.
Mythology is a way to explain the beginning (creation), the place people occupy in the universe, what things are the most important, and why things are the way they are. It is the equivalent of the science and religions of our day as they also speak to these same questions, though the method and answers may be different.