Many elements gave non-integral atomic masses because

Their isotopes have different masses

their isotopes have non-integral masses

They have isotopes

The constituents neutrons, protons and electrons combine to give fractional masses