In most introductory textbooks on molecular dynamics simulations the authors usually tell us how the connection between micro and macro is established using the partition function. Knowing the partition function of a particular thermodynamic ensemble basically tells us everything about the thermodynamic (macro) properties. For instance, in the canonical ensemble the expected value of internal energy is $$<E>=\frac{\sum_i E_i e^{-E_i/kT}}{Z}$$ where $Z$ is the partition function and the summation is taken over all micro-states of the system.
But nobody actually calculates the partition function, instead, for ergodic ensembles we simply calculate the temporal average $$<E>=\frac{1}{\tau} \sum_t E_t$$ which gives us the thermodynamic macro-version of the observable.
So why do authors bother and devote a whole chapter to this particular topic, involving the principle of maximum entropy to obtain $Z$ instead of just referring to the ergodic hypothesis?
Is there some important link I've missed or any actual utilization of the partition function?
edit: I can see how this could be useful in monte-carlo simulations where you do sample the phase-space directly. But how is $Z$ supposed to be helpful in case of dynamical simulations.