The Mesopotamian astronomers went way beyond just discovering the planets. They also traced their movement and discovered they followed predictable periodic paths. It isn’t surprising that these astronomers soon hypothesized that the motion of the planets was governed by laws that were set in motion by the gods. The idea arose of a divine cosmic order established by the gods. Even the king was simply a 'servant' to these laws.
The purpose of life on Earth subsequently became to live in accordance with this order. To know how the humans were to serve the gods, it was therefore necessary to read the stars. This is why they called the night sky the Shitir Shame (the Book of Heaven).
"The Great World History Book"