Why does Pearson's chi-squared test divide by the mean and not the variance?

I am wondering why in Pearson's chi-squared test, the divisor of each element in the sum is the matching expectation and not the matching variance.

As I understand it, the test works by standardizing each normal variable before summing, so the results set can be tested against the chi-squared distribution which deals with a sum of squares of standard normal random variables.

The way a normal random variable is standardized is by subtracting the expectation and dividing by the standard deviation. So, in Pearson's test, this should give the variance in the divisor of each element, not the expectation.

-
Notice that $\{O_i\}$ are not independent, their total must equal 1. More careful analysis must be made to establish the law of the statistics. – Sasha Dec 6 '12 at 16:56

Intuition/informal proof: The expected value is equal to the variance, so when you divide by the expected value you are in fact dividing by the variance, as you thought you should. If you think of it in terms of counts that follow a Poisson distribution this is natural, since the mean and variance of a $\operatorname{Poisson}(\lambda)$ distribution are both $\lambda$.