Note that the "ulcer story" is more complicated that the mainstream story. In particular: ulcers are exacerbated by stress, so it's not completely surprising people thought they were "caused by" stress. Also, in many people, the bacteria that causes ulcers also have other protective effects (more commonly in third world countries with poor sanitation).
In the case of CFS, there are probably multiple underlying etiologies, only some of which are induced by microbes.