If not sales, than what determines quality? Your personal opinion?
More like the general opinion of everyone, somehow reflected by sales.
If I say that "Big Rigs Over The Road Racing" has very high quality, is it a justified opinion just because I think so? No! Of course this would be nonsense, and you could say that I have a very bad taste in games. Why? Because EVERYONE ELSE on the planet, who knows anything about it, would agree that it SUCKS! This is why it had bad sales, probably only a few parents and kids bought it, randomly.
Of course sales=/=quality that directly, there are other things that effect the sales, like advertisements, the genre's overall niche-ness, and the franchise name, but generally, if a game sells better than another game with a similar background, it is because more people like it, a.k.a. it is better.