If there is a similarity between the two, it lies in their both living in a kind of rarefied world of their own design, cut off in some way from other people. The bacteriologist is the typical "absent-minded scientist" absorbed in his research. It is a cold, abstract pursuit in which he experiments on animals. Instead of contacting the police so that the anarchist can be apprehended, the researcher is more concerned about what a bother it will be to have to whip up a new batch of the strain that causes blue patches on monkeys and other animals.
One can hardly equate absent-mindedness and the pursuit of science to the anarchist's intention to engage in mass murder through germ warfare. But both men have a cold, calculating method about them. We are told nothing concrete about the anarchist's goals except that he wants to kill people in order to destroy the establishment—or perhaps to create a new system to replace it once the existing one is brought down through chaos and anarchy. Though the scientist's goals are usually benign, positive ones, he too wishes to change or remake the world through his discoveries, and therein lies the link between the two men in Wells's story.
I feel that the greatest similarity between the bacteriologist and the anarchist in H.G. Wells's "The Stolen Bacillus" is the similarity in their opinions and attitudes toward science. Specifically, both men seem to know and understand that scientific inquiry and work has incredibly powerful applications in the real world. Both men know and understand what could happen if a virulent strain of some disease made its way into the general population of a large city.
"And yet those little particles, those mere atomies, might multiply and devastate a city!"
Both men are in awe of the destructive power of something so microscopically small. Both men also respect the dangerous little microbes that are being worked on in the lab. Beyond that though, the similarities stop. The bacteriologist admits that he would love to see all of the bacteria destroyed.
"I wish, for my own part, we could kill and stain every one of them in the universe."
The anarchist, on the hand, would use the bacteria to destroy human populations.