Cheap archers can be used to break enemy cavalry charges (i.e. sacrifice them) so that the more expensive spear units survive longer and can wipe out the enemy, so sometimes it pays to place them right in front of the troops. Shooting the engaged enemy from the flanks is great as well, especially with gunpowder units or melee-capable archers (Aventurier, Venetian Archers, all those Turkish nasties and some of the spear-chucking fanatics, you name it).