The principal intent of this Perspective is to review the mechanisms that are responsible for the shifts of binding energies, ΔBE, observed in x-ray photoelectron spectroscopy (XPS) measurements and so to relate the shifts to the electronic structure and the chemical bonding in the systems studied. To achieve this goal, several theoretical considerations are necessary beyond just the calculation of XPS BEs. Though briefly discussed here, we are not primarily interested in absolute values of BE or quantitation using relative intensities. Within the molecular orbital (MO) theory framework, it is shown that the analysis of orbital properties is critical for the correct interpretation of XPS. In particular, rigorous definitions are given for the initial state and final state contributions to BEs and to BE shifts, ΔBE. It is first shown how the BEs of core levels are related to the electronic structure by consideration of the BEs for a model atomic system to establish the origins and magnitudes of BE shifts. The mechanisms established for the model system are then applied to a review of XPS measurements and MO theory on a set of real examples. An important focus of the paper is to demonstrate that, in many cases, initial state mechanisms allow for a definitive interpretation of the XPS BE shifts and that an important role of theory is to provide qualitative explanations rather than quantitative agreement with XPS measurements. The mechanisms established are a guide to the interpretation of XPS measurements and consideration of these mechanisms may suggest additional calculations that would be useful. It is concluded that there is still a bright future for the coupling of ab initio MO theory with XPS measurements.