Alexander the Great of Macedonia personally conquered a huge amount of territory in the 4th century BCE, including Greece, Egypt and the Middle East. When he died at the age of 33, his generals carved up his empire, each claiming a portion as their own. The Ptolemaic and and Selucid empires are two of these successor kingdom.
While these empires were very far from Greece, Alexander and his generals brought Greek culture with them, and they continued to promote it within their territories. As such, Greek gods and goddesses continue to show up on their coinage.