The formation mechanism of 2-dimensional electron gases (2DEGs) at heterointerfaces between nominally insulating oxides is addressed with a thermodynamical approach. We provide a comprehensive analysis of the thermodynamic ground states of various 2DEG systems directly probed in high temperature equilibrium conductivity measurements. We unambiguously identify two distinct classes of oxide heterostructures: For epitaxial perovskite/perovskite heterointerfaces (LaAlO3/SrTiO3, NdGaO3/SrTiO3, and (La,Sr)(Al,Ta)O3/SrTiO3), we find the 2DEG formation being based on charge transfer into the interface, stabilized by the electric field in the space charge region. In contrast, for amorphous LaAlO3/SrTiO3 and epitaxial γ-Al2O3/SrTiO3 heterostructures, the 2DEG formation mainly relies on the formation and accumulation of oxygen vacancies. This class of 2DEG structures exhibits an unstable interface reconstruction associated with a quenched nonequilibrium state.