Question: why do the isotopes of an element have different atomic masses?
Answer: Different isotopes of the same element have the same atomic number. They have the same number of protons. The atomic number is decided by the number of protons. Isotopes have different mass numbers, though, because they have different numbers of neutrons.