Blarg: 3. To free up slots in the tavern to see if you can find another hero who generates gold or gems. If you have money to burn, or if a hero has more value in troops than he costs (or about the same), buy and dump, keeping the troops -- burn through junk heroes to see if you luck out and find someone great lurking underneath. A hero with the gems you need to advance or buy troops is a bargain, and gems trade well for the raw materials you need to quickly build up and staff a new castle.
Heroes function not just as force multipliers, but as major parts of your economy that easily pay for themselves. It's a rare HOMM3 game in which I don't have 8 heroes.
Using the HOMM3 pack from GOG.com + Heroes3HD from here
http://sites.google.com/site/heroes3hd/ , it allows you to 'invite specific hero' from the tavern.
Thus, after spending initial outlay of $2000, you can then hire the hero with the specialty you want for another $2000. If you want more you can keep the chain going.
If you open and print the HOMM3 manual, you'll know which hero carries a strong spell from the start or gives out resources, thus paying for themselves in a week's time or less.
This can be considered cheating but if you've had no luck finding the hero you want, that feature is there to use. Its also handy when you are playing the map where the entire world is covered in hostile terrain e.g. swamps and you'd really want some heroes with Pathfinding, therefore you want Beastmasters or Barbarians as they are more likely to gain this skill.