Prince Harweda's motivation for giving part of his apple to the bird is the bird's sad position inside the cage. Although there isn't much text to go off of, it's safe to say that the Prince felt bad for the bird stuck in the cage with no food while he was free WITH food.