You are loading the images each time you use them but you never free them. The program will use more and more memory and what probably happens is that it fails to load the background because there is no free memory to store it in. That's why the background disappears. Mario is much smaller so it's easier to find memory to store it in so you can keep loading him for a while longer.
Just load the images before you use them and reuse them throughout the game. When you are done using them you can free them by using SDL_FreeSurface.