A king once had a good friend whom he hadn't seen in many years. When this friend finally returned, the king was so happy to see him that he told his treasurer to take his friend - who happened to be a pauper - to the royal treasury, and to give him one hour to take as much money as he wanted! So they brought him into the treasury and gave him a bag, which the poor man proceeded to fill with gold coins until the bag could hold no more. Full of gratitude and happiness, the poor man began to leave, but as soon as he stepped out of the door, the guards gave the bag a big kick and all the coins spilled onto the floor. The man was distraught, but he looked at his watch and saw that he had still had plenty of time until his hour was up, so he quickly returned to the treasury and began to refill the bag with coins. But when it was full and he tried to leave, once again the guards gave the bag a big kick and everything went flying. The man was at his wits end, but seeing that he still had more time, he refused to give up and he went back in and tried to fill the bag yet again.
But the same scenario repeated itself over and over. The guards kept kicking the bag of coins and causing everything to spill, until the poor man was sure that he was simply wasting him time.
Finally the hour was up, and the guards dragged the poor man out of the room with his bag barely half full.
But suddenly, the poor man looks up and he sees a wagon over loaded with gold coins standing before him. And as he stands there wondering for whom all that money is intended, he sees the king coming to greet him with a big smile. And the king tells him that the entire wagon load of gold coins belongs to him, explaining that he had commanded the guards to make him lose his coins each time, so that he would manage to gather up so much more in the one hour that he had!
And so it is with our life on this world. Often after we have made good progress and our bag is "full", Hashem commands the guards to give us a kick and we lose everything. Hashem does this purposefully so that we can keep filling up the bag again and again, but the foolish man thinks that all his work is in vain and he simply gives up trying. However, the wise man knows that he hasn't lost anything from his previous efforts, and he starts over again and again from scratch - with JOY.
And if we follow the path of the wise man, when our time is up and we come to the next world, we will see a huge pile of spiritual "gold coins" waiting for us from the progress that we had made each and every time we started over again!