The law states that matter is conserved. It is not randomly llost or gained, but transformed.
This holds true because when a glass of water is left out over night, the water evaporates. The water doesn't magically disappear. It is just transformed into water vapor.