Well, first of all, Yersinia generally won't cause symptoms until a few days after exposure. It's pretty unlikely that the tofu was in fact the cause of your food poisoning, since symptoms of any bacterial illness would rarely show up that quickly. Unfortunately, this is more and more commonly the case with food-born illness. (I say unfortunately because the increased incubation time makes contamination more difficult to track. Even if a lot of people are affected, the cases are rarely reported unless they are severe enough to demand treatment.)
However, even if the tofu was responsible, it doesn't mean the bacteria survived the cooking. If you handled the raw tofu or got the water from it on your hands, the counter, any utensil, you could easily have transferred the bacteria back to your food after it was cooked.
I don't think something like this would necessarily be cause to change your source anyway, although I certainly support ditching Safeway for one of the better stores you mentioned. Food contamination is increasingly the rule rather than the exception in the U.S., which is why raw processed foods (which can be contaminated within as well as on the surface) should always be handled with caution. It's sad to have to think of our food as something dangerous, but it's becoming a necessity.
John Robbin's The Food Revolution and Marion Nestle's Safe Food both have a lot of excellent documentation about this issue.