Semiconductor glasses exhibit many unique optical and electronic anomalies. We have put forth a semiphenomenological scenario [A. Zhugayevych and V. Lubchenko, J. Chem. Phys. 133, 234504 (2010)] in which several of these anomalies arise from deep midgap electronic states residing on high-strain regions intrinsic to the activated transport above the glass transition. Here we demonstrate at the molecular level how this scenario is realized in an important class of semiconductor glasses, namely chalcogen and pnictogen containing alloys. Both the glass itself and the intrinsic electronic midgap states emerge as a result of the formation of a network composed of σ-bonded atomic p-orbitals that are only weakly hybridized. Despite a large number of weak bonds, these pp-networks are stable with respect to competing types of bonding, while exhibiting a high degree of structural degeneracy. The stability is rationalized with the help of a hereby proposed structural model, by which pp-networks are symmetry-broken and distorted versions of a high symmetry structure. The latter structure exhibits exact octahedral coordination and is fully covalently bonded. The present approach provides a microscopic route to a fully consistent description of the electronic and structural excitations in vitreous semiconductors.