A 4 legged chair is much less likely to fall over because it has more points of contact with the ground (yes, this extrapolates). While you're correct that a 3 legged chair isn't going to wobble, many would call it less stable because it is more likely to fall over. The force is distributed only across 3 points and if you sit at an edge that force is going to be highly concentrated along two points. In fact, those two points are always going to create a lever. In a 4 legged chair there are many edges that you can sit on where the weight will be distributed to three points, you have to be specifically on the edge where two legs create a plane to distribute the force to 2 legs (see why this extrapolates? More legs and it is harder to distribute force to only 2 legs).
Why 4 though? Well, I don't have a scientific answer. But it is pretty well balanced, doesn't increase cost much, nor weight. So probably just a compromise. Though in a lot of rolling chairs you will see that they typically have more than 4 points of contact with the ground (notice how much harder it is to tip these over?).
tldr: 4 is actually more stable in the sense of "you're less likely to fall out of the chair and bonk your head".