The Greeks mythology was inspired by their worldview. From their myths, it seems like they were all fantasy, and they used them to describe things they didn’t understand. They would also seem to form their myths off their religion. They created creatures and idols in their myths that were sapped from their religion.
The tales of Hercules is a great example on how their religion was a strong influence of mythology. He is practically almost a god, being able to perform tasks nobody else could. This was how the Greeks envisioned their gods.