Unforunately, Game Boy Colour, Game Boy, and Game Boy Advance system cartridges run on "batteries". The batteries are what keeps them running and working properly, but, if the cartridge is mistreated, glitches may start to happen, or they may happen because of old age. Unfortunately, on of these glitches is the "saving error". Saving the game usually works, but the next time you play the game, you may lose some save data.
I asked a slighty similar question asking how to prevent the glitches from happening, and there is no way :(
However, along, with the answer I got a list of glitches, so here's a link.