Many elements gave non-integral atomic masses because

They have isotopes

their isotopes have non-integral masses

Their isotopes have different masses

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