What would explain, for example, why an atom has 79 rather than 80 protons in its nucleus? Is there a specific explanation or must we appeal to the entirety of a physical theory?
The number of protons is what defines an element.
The number of protons must equal the number of electrons outside of the nucleus so that the atom has a neutral charge. The atomic number is used to identify the element and equals the number of protons in the nucleus. The number of neutrons in the nucleus may vary for a specified element. This leads to there being isotopes for a given element.