Why the ratio of (distance from expectation)^2 / expectation in a goodness fit test follow a chi-square distribution?

I know that the sum of square of normal random variables follow a chi-square distribution. But when I learn how to do a goodness-fit test I don't know why the ratio of (O-E)^2/E follows a chi-square. I tried to square root of it first so that I might get something looks like a normal, but my new question arises : why (O-E)/sqrt(E) follows a normal-distribution?

I know from sampling distribution that if the sample is from the same distribution as the population then the sampling distribution of sample mean is approximately normal if n is large according to CLT, are those two concept related in some way?