H.G. Wells gets tons of extra credit points for even coming up with the idea, and the whole microbe angle was pretty clever/edgy for its day.
I suppose his thinking was that such a dry, cold, and austere world as Mars was relatively sterile. Silly to think now, because with ecosystems as we know them beginning and ending with the microbes, and as the hardiest survivors of all, should mean the Martians knew of the risks, but that was not common knowledge back then.
"Germ theory" as a cause of disease was still relatively new.
Or the lack of bacteria and pathogens could be seen as a symptom of Mars dying and what forced their hand to invade Earth as a last ditch effort to save their race.
Hell, it could STILL happen, even to us, or some other race. For instance, say some race that evolved around a red giant or red dwarf, likes temperatures around the boiling point of water, and has lots of sulfur compounds in their biology. Because of their home star, they see in light from red, into the IR range, and they've never ever imagined that bacteria smaller than 600nm were possible. (Unless they used full spectrum, or blue/green light (like harsh UV to them), or electron microscopes... they couldn't even detect them.)
And the filters on their bio-suits to explore Earth are 1-2 microns. (1000nm)
There's plenty of archea and deep-sea trench, and geothermal spring bacteria that would love to much on them...