When using $\chi^2$ to test for goodness of fit, if there are $k$ categories then the $\chi^2$ distribution has $k-1$ degrees of freedom. I’ve seen explanations that the reason there is $k-1$ degrees of freedom is because if we know the number of times the $k-1$ categories occurred (and sum of the $k$ categories), then we can figure out the number of times the last category occurred.
Given that a $\chi^2$ distribution with $k-1$ degree of freedom is the sum of squares of $k-1$ independent standard normal distributions, is there a way to show that the number of occurrence of the $k-1$ categories are independent for an experiment testing the fairness of a die? If I know the number of times $1$ occurred (say 35 of 36 rolls are $1s$), doesn’t that change the probability for the number of times $2, 3$, etc. can occur?
For the test statistic $\chi^2 = \sum_{i=1}^{k}\frac{(O_i-E_i)^2}{E_i}$, if only $k-1$ categories are independent, why does the computation include the sum of all $k$ categories?
Unrelated to the above, for a 2x2 contingency table (test for independence), if the 2 rows sum to $a$ and $b$, and the 2 columns sum to $c$ and $d$, such that $n = a + b + c + d$, is the expected value $E_{1,1}$ (for cell $(1,1)$), sampling with replacement $a$ times each with probability $c/n$? If so, why is this valid, if we select $a$ objects out of $n$ aren't we sampling without replacement?