The truth behind performing good deeds to gain entry into heaven may be debatable!
There are some references about such idea in the scriptures but its fundamental aim is to motivate people to follow the path in life which is moral and good for the self and the society at large. Getting a sick child take medicine is a great challenge. A mother has to resort to cajoling the child into taking medicine by saying that she would reward him with a toy. The child does not know the worth of the medicine, but he does know the worth of a toy. In the hope of getting rewarded with a toy, he takes the medicine which works in his best interest.
Similarly, an average individual does not appreciate the worth of living a high ideal life. Sensual pleasures are what interests him more. He can visualize his interest of securing the heavens which is the happiness he is seeking for. The prospects of heaven makes him take up a worthy course in life. This can’t be thought of as a deceit or a lie as it would indeed usher him in the direction which has much more to offer than the said reward.