This is a simple oversight I'm sure so I decided to post this in the suggestions rather than bugs.
Can the unequip unit and the unequip all units unequip the heroes from units as well? If heroes are treated as accessories to units then they should get unequipped with the rest of the gear when you click unequip unit button and when you click unequip all units then hero gear should get unequipped as well.
There are only 12 heroes one can have anyway not like you'll get lost in the rubble reequipping them. It's a lot faster and less of a hassle to equip a hero on a unit with 2 clicks rather than unequipped the hero from a unit manually and then equipping it on another unit especially if you already completely unequipped a unit in the first place.