Monitors tend to have more immune system protection from pathogens than snakes do, not surprising as they are more likely to eat carrion. Snakes are far more prone to respiratory infections from the bacteria and mold that soil harbors. Garters and a very few others do fine with soil but I wouldn't use it for most snakes.
Outdoors soil is exposed to wind, rain and sunlight that help to keep pathogens down to a reasonable population, once removed from those things it's tough to keep dirt clean enough for most captive herps.
The Zombie Mama is here!