Very true, and it's just easier to have a group of guys fight in a group than try to train a bunch of guys as commandos then command them to show up at the right place at the right time. You know they'll be there because you can see them before the fight starts. (Using insurgent tactics the average soldier has a serious concern that his comrades will either chicken out, get lost, or be late. If any of those happen you'd be a dead man. IE a variation of the Prisoner's dilemma.)
There were irregular troops or "skirmishers" that largely fought on their own terms. Useful for keeping back scouts (or acting as scouts themselves), preventing opposing armies from spreading out too much, raiding baggage trains, etc. One of the main problems in ancient battles, particularly the medieval period, WAS getting troops to actually show up and fight. There was often a very decentralized system of control, everyone just kinda followed one guy they had to see (and who was often in the front line), and allegiances were...flexible to say the least. If the money ran out, the lead guy was sick or injured, the harvest time was coming up, lots of reasons why an ancient army could just melt away.
One of the aspects of the "myth of gentlemanly warfare" that echoes real practices was hostage taking on the field of battle. Wealthy warriors had value for ransom, so enemy soldiers ha da strong incentive to NOT kill knights and other leaders. Whilst some serf given a spear and pressed into a line of battle may not be worth anything (and thus killed just to spare the cost of feeding him) a knight that can afford a horse, suit or armor, all that leisure time to train with arms, etc can be sold back for a MASSIVE windfall, or held hostage as a sign of good conduct, to enforce a treaty, etc.
In fact, a lot of the "Wipe 'em all out!" type of warfare only really exists in certain religious conflicts and more modern "total war" scenarios combined with weapons of mass destruction. People WERE the reward for warfare back in the day, they extracted the resources from the land everyone needed. So a battle was necessary to enact a change of leadership but the goal wasn't genocide, just a tribute or shift in control for taxation. Lots of older cultures had a very inclusive attitude of "just change these couple of things and now you are one of us and you can carry on with all the rest" that more modern societies don't have. Logistics, increased agriculture, industrialization all allowed for far larger armies to take the field for truly titanic clashes that were just impossible back in the day (even if the sources say there were 250,000 troops coming out of Persia towards Athens, it seems very unlikely).