# Why do statistical ensembles always fix three variables?

In basic course in statistical (classical) mechanics and thermodynamics, the ensembles used (microcanonical, canonical, grandcanonical, NPT) always assume exactly three variables (n,V,T in canonical fixed) fixed, while treating the remaining variables in probabilistic fashion.

Is it just a mathematical convenience, or does it express fundamental physical laws? Have other ensembles with other number of fixed variables been considered in the literature? Have they any practical applications?

It's the simplest useful case. There are more complicated ones, like when external magnetic/electric field needs to be taken into account, or when multiple chemical species are involved, so there is no single $n$, but several molar numbers $n_1,n_2,...$.