Firstly, in Heroes 1 and 2, castles or towns of races other than the starting one appeared slightly less often, so the argument about units doesn't hold up (and even if they don't appear, what good are these hydras with 0 defense to a hero if my attack is 10!). Also, in Heroes 1, due to the absence of secondary skills, any hero could, after building a complete guild of mages, learn all spells at once, so low-level mages were mainly good for minor "harassment" (which the computer readily used) in the form of learning Storm or Armageddon - take a level 1 mage (thankfully with +3 strength), learn the spell, attack a strong hero, cast it, and that's it. And for a normal, large battle, mages clearly lost to warriors (especially if the difference in attack and defense is around 10, which is clearly visible in the first two games). Also, another plus for warriors in the first part of Heroes is that any curse placed on your unit can be removed by any positive spell cast on yourself (in Heroes 5, not every dispel or antimagic will save you from a curse if your magic power is much lower than the opponent's magic power, which gives mages some advantage).
Added 1 minute ago
With a full build in the Strength branch, a warrior gains immunity to magic and excellent ranged attack. With this setup, an enemy mage hero is defeated in 1 turn, and all that remains is to deal with his army.