Bail is granted pending appeal under a particular set of circumstances. These include the quantum of sentence, time already served, likelihood of absconding etc.
If the appeal is likely to be pending for a long time, it would be unjust for someone to spend the entire time in custody, as that could render their appeal infructous. For instance, if the appeal could remain pending for 5 years and the maximum sentence that can be imposed is of 5 years, the very point of lodging the appeal would be defeated, and would be a great injustice.
Moreover, if the convicted person has not absconded during trial, and has come to court whenever called upon to do so, he ought to be given bail as by conduct he has shown that he will not evade justice.
Other factors are also taken into consideration such as age of the person, health, mental state etc.