We combine state-of-the-art oxide epitaxial growth by hybrid molecular beam epitaxy with transport, x-ray photoemission, and surface diffraction, along with classical and first-principles quantum mechanical modeling to investigate the nuances of insulating layer formation in otherwise high-mobility homoepitaxial n-SrTiO3(001) films. Our analysis points to charge immobilization at the buried n-SrTiO3/undoped SrTiO3(001) interface as well as within the surface contamination layer resulting from air exposure as the drivers of electronic dead-layer formation. As Fermi level equilibration occurs at the surface and the buried interface, charge trapping reduces the sheet carrier density (n2D) and renders the n-STO film insulating if n2D falls below the critical value for the metal-to-insulator transition.