At that time of military history, it seems the phalanx was the accepted supreme military style that won battles. So countries tried to outdo each to see who could do the phalanx best.
Since archers are able to provide ranged fire, but the phalanx had to stay in their formation, why couldn't a vaunted, specialised phalanx army be easily defeated by an army of multiple clumps of many archers?
The archers could just keep their distance, shooting into the phalanx, at a high trajectory if necessary to get over any shields being held at the front of the body. If the phalanx charged at any one clump of archers, they would simply retreat, at a run if necessary, while on the other sides of the phalanx the other clumps of archers could meanwhile advance and keep shooting. The phalanx would be under constant fire from all directions, and never able to close with the enemy, so all their long spears and disciplined formation technique would be useless. Eventually, the number of arrows would take their toll and the phalanx would be whittled down and defeated.
Was it not considered the honourable way to fight, it was only honourable to meet phalanx to phalanx?
Or would roaming cavalry be too easily able to hassle the archers? But the clumps of archers could have been protected from cavalry by infantry with long spears, or by their own protective light cavalry.
For countries who weren't as good with the phalanx, why didn't they try this method?