In a past life of the Great Dharma Patron, King Ashoka, he was just a small boy playing in the sand with other children. Pretending to be a king with the other children as his ministers, they built a sand castle which included a treasury.
At this time, Buddha Shakyamuni passed the children playing in the sand on his alms round. Upon seeing the Buddha, the small child was very inspired. Immediately he bent over the sand castle and picked up the imaginary treasury room of the castle in his hands. He quickly walked over to the Buddha to place these imaginary riches within his begging bowl. At first Ananda moved to stop the boy, thinking with a loving heart that this sand would ruin the food within the Buddha's begging bowl. Yet the Buddha stopped Ananda from preventing this offering.
The Buddha was so tall, so one of this disciples bent down in front of him and requested the small boy to stand on top of his back. Doing so, the boy joyfully placed the imaginary treasury within the Buddha's begging bowl.
Following this event, Ananda asked the Buddha why he had allowed the boy to put sand in his begging bowl. Smiling, the Buddha said that two hundred years after his mahaparinirvana a universal king (Skt. Chakravartin) would arise in India, and that he would perform extensive activities in support of establishing and spreading the Buddhadharma throughout the region. The Buddha said that his name would be King Ashoka, and that this very boy would become that king due to the incredibly vast merits he developed by offering the Buddha a handful of sand with a genuinely loving heart.
As told by Khenchen Palden Sherab Rinpoche
This story shows that motivation or intention in all our actions, especially when making offerings to Buddha, is more important than the action itself.
All actions with intention becomes our karma... good or bad. We can cheat or lie or pretend in front of others but we can never do that with our own karma...