In other games, this situation is handled by moving the unit that cannot perform the command along with the units that can perform the command.
An example in SC2: 2 zealots (melee attacks) and 1 high templar (no melee nor ranged attacks, spell class only). With 2 zealots and 1 high templar selected, if the player attacks say 1 marine, then the zealots and high templar will move to the marine's position. The high templar will just move along with the zealots until it too reaches the marine.
Why would you want this behavior? Because the high templar has spells that might be useful for the attack. You wouldn't want to box select and move/attack your units only to find out that your high power spell casters are still at home b/c they couldn't actually attack anything.
Likewise, with the example of the worker, maybe you want an escort for your workers to the gold/wood/stone patches. If the archer doesn't go along with the workers, you will have to issue yet another command to insure that, slowing down your micro.
I've got some other things to work on ... but I think this is an important gameplay feature, so when I have time, I'll look into the code for this one.