What makes you think that heroes freed from prison are not the last ones to be upgraded?
And what makes you think they are the last ones? The method is clearly described in section 5.10.2. Freeing a hero from prison is a different method.
And again, about all other methods - it is clearly stated - if it's not 5.10.2, then there's no point. And I'll repeat the "motivational part" - the essence of the rule is to limit overpowered heroes - freeing a hero from prison is much easier than leveling them up independently, so it makes sense to limit such an easy way to get a powerful hero.