I always keep it in the cage so that my hams can go in it whenever they want. Sand baths in the cage permanently won't cause any issues generally and shouldn't be removed unless your hamster develops skin issues and other such. They're not like chinchillas who would need their dust (sand in the case of hamsters) removed so they don't get dry cracked feet, so go crazy with the sand!