Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
The following is more of an educated guess than a factual claim. If you think I'm in the right direction I could read up and try to provide an answer. In reality you always have $\omega = \sqrt{\frac{k(M + m)}{Mm}}$ But if $M$ is very large, compared to $m$ you have $M + m \approx M$ so the $(M + m)$ from the numerator kind of cancels out the $M$ in the denominator, so you're left with only $\sqrt{\frac{k}{m}}$. While the box is stationary $M$ is the mass of the box + the mass of the earth, so it is very large, compared to $m$ and when it is in free fall it is just the mass of the box.