They are not at all unexpeced. They were carefully planned by the Greek commanders. I suggest you took at some of the more popular questions in Ancient Wars, where the Greek strategies are explained. Start looking up the answer to the question:
How did the Persians lose the Persian wars
The Greeks didn't find them unexpected - if they had thought they couldn't win, they would have come to terms with Persia.
Not unexpected at all. The southern Greeks expected to win, otherwise they would have come to terms with Persians, as the northern Greek had done.
Herodotus of Halicarnassus.
Some sided with the Persians, others combined to repel the Persian invasion.
Greco-Persian Wars .
The Persians wanted a peaceful world, and their aim was to put an end to the incessant fighting between the Greek cities which spilled over into the Persian empire's Greek cities. So perhaps Greece would have been spared the endliss ongoing wars which ravaged it if a Persian peace had been imposed. Of course the Greek cities which banded together to repel the Persians wouldn't see it that way. From a purely military perspective, the Persian army was also much larger and much more formidable than any Greek force that could be assembled to meet them. Surrendering in advance of the conflict would have prevented all of the possibly pointless loss of life from opposing the Persians.
Because most of the records historians have about the Persians were written by Greeks, the history is very skewed (Greeks hated the Persians- they had lots of wars). It's very negatively biased.
Herodotus.
Herodotus of Halicarnassus.
It ended Persian attempts to control Greek war-making, leaving the Greek city-states to increasingly destructive wars with each other.
Their infantry warriors wore metal armour, which the Persians did not.
They spent 50 years of their time repelling the Persians.
The Persian Empire and various alliances of Greek city-states 499 to 449 BCE.
The Greek won through superior sea (Salamis) and land (Plataea) tactics.
Superior strategic and tactical policy and execution.
A coalition of about 200 Greek city states, led first by Sparta and then by Athens.
The Greek city-states of Ionia revolted against Persian rule, and the warfare spread to the include the mainland Greek city-states.
The Persians controlled the Persian naval forces, and the Greek city-states initially appointed a Spartan admiral Eurybiades. When Sparta withdrew from the forces after the victories of 480-479 BCE, Athenian general Cimon took over for the next 17 years.
Some sided with the Persians, others combined to repel the Persian invasion.