The image of laid up treasures disappearing comes from the Worship of the Shalems. It appears to be part of a commandment to be single, and not serve Mammon -- in other words, consecration -- and comes after the shalem is washed and anointed and before he is dressed and participates in the feast of bread and wine.
Mormon uses the image skillfully. The wicked lay up their treasures and lose them, because their hearts are in the wrong place. Ammaron, though, the good and faithful keeper of the record, laid up his treasure (the plates) and it was not lost, because he served God.