It would seem unfair that Lord Vishnu punished Mahabali, who like his grandfather (Prahlada), was deemed one of the greatest devotees of Lord Vishnu, and a very just king. However, Mahabali is not considered penalized by Vishnu, since he was granted the blessings of Vishnu and his remembrance allowed to be observed for eternity by way of Onam. He was also given the opportunity to keep his head under Lord Vishnu’s holy feet, thus allowing all his sins to be wiped away.
Also, by the grant of Vishnu, Mahabali will be the next (eighth) Indra during the time of the eighth Manu, Savarni Manu. Purandara is the current Indra.
It is believed that Mahabali became the greatest earthly devotee of Vishnu by sacrificing his kingdom to him.