Your view is distorted.
Before Marathon the Greeks were never able to defeat the superior Persians - the Persians fought using combined arms of heavy and light infantry working with heavy and light cavalry. Greeks (especially Athens who instigated the war) were not only helping the rebellions in Asia Minor but sent forces to try and liberate Egypt from the Persians as well - all failed.
In open fields the Greek hoplite phalanx would be easily outflanked and defeated as it was over and over again by the Persians until Philip of Macedon and his son Alexander incorporated a cavalry element to their phalanx. Their cavalry was still inferior to the Persians but it prevented their outflanking and thus allowing the phalanx to smash into the weaker Persian infantry.
There was a real reason the defeat of Persia TWICE was seen as a miracle by the Greeks - because it was.
And the Athenians had a lot to do with that victory as well. In a few decades Sparta would take Persian gold to create a navy to be able to defeat Athens - Persia did get her revenge on Athens via her gold.
Greeks (especially Athens who instigated the war) were not only helping the rebellions in Asia Minor but sent forces to try and liberate Egypt from the Persians as well - all failed.