Pre-deformed glassy polymers exhibit distinct stress responses with opposite loading directions, referred to as the Bauschinger effect. Although this phenomenon has been known for decades, the underlying microscopic origin remains largely elusive. In this work, we perform coarse-grained molecular dynamics (CGMD) tension and compression simulations on a typical glassy polymer polycarbonate. The intermedia variables of self-entanglement and network orientation are extracted to describe the internal microstructure change during deformation. The results show that the competition between intra-chain deformation and inter-chain friction leads to the occurrence of yielding, while strain hardening is governed by the increase of inter-chain friction. Motived by the physical mechanisms revealed by the CGMD simulations, we further develop a mean-field shear transformation zone (STZ) model which contains the crucial internal variable of self-entanglement. The theoretical model well captures the yielding, strain hardening and the Bauschinger effect observed in MD simulations. By comparing the mechanical responses of the polycarbonates under tension and compression, we contribute the substantial Bauschinger effect to the distinct deformation mechanisms in these loading processes. The increase in yield strength during tensile-reloading is governed by the decrease of self-entanglement, which leads to enhanced inter-chain friction, while the decreased yield strength during compressive-reloading is associated with the increase of self-entanglement, causing reduced inter-chain friction. Overall, this work promotes the fundamental understanding of the complex mechanical responses of glassy polymers and also provides a new continuum-level theoretical framework for amorphous solids.