Does a statistical system go into a pure state as the temperature $T\to 0$ (or $\beta\to\infty$)? The density matrix $\hat{\rho}$ for a canonical ensemble is given by $$\hat{\rho}=\frac{\sum\limits_{n}e^{-\beta E_n}|n\rangle\langle n|}{Z}\tag{1}$$ $$=\frac{e^{-\beta E_0}}{Z}\Big[\sum\limits_{n=0}|0\rangle\langle 0|+\sum\limits_{n=1}e^{-\beta(E_1-E_0)}|1\rangle\langle 1|+\sum\limits_{n=2}e^{-\beta(E_2-E_0)}|2\rangle\langle 2|+...\Big]\tag{2}$$ where the sum over $n$, represents the sum over quantum states, not energy levels. Also note that since $E_0$ is the ground state enrgy, the difference $(E_n-E_0)>0$, for all $n>0$.
As $T=0$, or equivalently, $\beta\to\infty$, only the first term in (2)contributes dominantly. The density matrix $\hat{\rho}$ goes to $$\hat{\rho}\to\frac{1}{Z}g(E_0)e^{-\beta E_0}|E_0\rangle\langle E_0|\tag{3}$$ where partition function $Z$ goes to $$Z\to g(E_0)e^{-\beta E_0}\tag{4}$$ Here, $g(E_n)$ represents the degeneracy of the $n^{th}$ energy level with energy eigenvalue $E_n$. With (1) and (2), the density matrix simplifies to $\hat{\rho}=|E_0\rangle\langle E_0|$ so that $\hat{\rho}^2=\hat{\rho}$. Therefore, the calculation implies that at $T=0$, the system goes to a pure state. 
I don't understand this physically. There will be degeneracies in the ground state. Then why should the system settle down in a pure state? And which degenerate state will it settle down? Intuitively, at $T=0$, the system should be described by an ensemble every member of which are in the ground energy level but in different degenerate states.
 A: Well, if there were degeneracies, the simple product $|0\rangle \langle 0|$ would be replaced with the simple sum
$$ \sum_i |E_0,i\rangle \langle  E_0,i| $$
over all the ground states. Most realistic systems have non-degenerate systems. In particular, objects' wave functions are usually decoupled to the center-of-mass motion degrees of freedom; and the internal ones.
The center-of-mass degrees of freedom have the ground state at $\vec p =0$ which is unique but a part of a continuum. These states become discrete e.g. if one puts the system in a box so it's not a problem. The ground state of this part is non-degenerate.
The internal degrees of freedom usually have a non-degenerate ground state if that is rotationally symmetric, and it usually is. The uniqueness of the ground state is equivalent to the "third law of thermodynamics" that says that $S\to 0$ for $T\to 0$. The vanishing entropy and the uniqueness of the ground state are equivalent.
Condensed matter physicists are interested in degenerate and non-degenerate systems. Superconductors may have degenerate ground states, and topological degeneracy may appear in some superconductors and non-interacting fermion systems etc. On the other hand, Fermi gases, Fermi liquids etc. need to have unique, non-degenerate ground states. Various conjectures state that all materials (at least with some conditions) become Fermi liquids at ultimately low temperatures, so they also have to have a unique ground state.
For some systems, the non-degeneracy is common sense. For example, the Fock space is a tensor product of harmonic oscillators, and each of those has a unique ground state. So everything that looks like a crystal tends to have a unique ground state, even if you add some interactions.
More generally, if two energy eigenstates in a discrete spectrum have exactly identical energies, it must have some explanation – this degeneracy doesn't occur by chance. Some symmetry is the required explanation in most cases. For example, if the ground state is guaranteed to have spin $J$, it implies the degeneracy of at least $2J+1$ states. This is still a small number for small $J$ so there's no entropy density in the material – a macroscopic amount of it.
So again, most systems you want to consider have non-degenerate ground states – as quantum field theory of any realistic type, after all, which has a unique vacuum.
A: We have an extremely fortunate situation as physicists: we get to split up our notion of degeneracy. On the one hand there are "intrinsic" degeneracies which come from some sort of conservation law or symmetry or some very important cancellation in our Hamiltonian: we deal with these because we want to. All other degeneracies are "accidental" and we are free to ignore them.
The reason is that the world is generally messy in some way that breaks whatever symmetry we don't care about. Oh, you have a spin degeneracy in your system? Well, you have forgotten the weak effect of Earth's magnetic field, which puts one of these states at a slightly higher energy than the other. Oh, you tried to correct for that by doing this experiment out near Pluto? Well, you neglected that this thing is contained in a metal box which probably has some negligible but nonzero magnetization that again splits the energies. It's hyper-hyper-hyper-hyperfine adjustments, but it lifts the degeneracy. 
Your educational resource probably is just assuming that there are no intrinsic degeneracies to worry about in the ground state.
So for an example of cases where we really care about the degeneracies -- they are intrinsic rather than accidental -- you can see all of the work done on topological insulators where the particle conservation laws and time reversal symmetries cause "topologically protected edge states" which demonstrate degeneracy robust to the usual noise and mess of the world. In fact this ground-state degeneracy is one of the hallmarks of what's called "topological order".
You also see professional mathematicians stealing this idea from us, for example when people working in probability say "almost surely" they are often doing a variant of this; two lines with some random-variable slopes, if those slopes are to some extent independent continuous random variables, will have probability zero of having the exact same slope and being parallel. So, speaking purely physics-wise, they intersect somewhere. I also saw this in Tadashi Tokieda's lectures on geometry; his attitude towards degeneracy is indeed something like "tweak the system a little so that there is no degeneracy, figure out what the intersection point is doing as you approach the degeneracy, if it's not something interesting then we don't really care." It's also a similar approach to replacing $(x^2 - 1)/(x - 1)$ with $(x + 1)$, yes that's not strictly true for all points but you're not going to hit the point $x=1$ exactly so who cares that the former was not well-defined; let's just fill in that discontinuity.
