Resonant inelastic x-ray scattering is used to investigate the electronic origin of orbital polarization in nickelate heterostructures taking $mathrm{LaTiO_3-LaNiO_3-3x(LaAlO_3)}$, a system with exceptionally large polarization, as a model system. We find that heterostructuring generates only minor changes in the Ni $3d$ orbital energy levels, contradicting the often-invoked picture in which changes in orbital energy levels generate orbital polarization. Instead, O $K$-edge x-ray absorption spectroscopy demonstrates that orbital polarization is caused by an anisotropic reconstruction of the oxygen ligand hole states. This provides an explanation for the limited success of theoretical predictions based on tuning orbital energy levels and implies that future theories should focus on anisotropic hybridization as the most effective means to drive large changes in electronic structure and realize novel emergent phenomena.