atomic masses are the weighted average of the masses of all isotopes for that element.
Hydrogen, for example, has 3 isotopes: Hydrogen, Deuterium, and Tritium. Normal Hydrogen has a mass of 1, deuterium a mass of 2, and tritium a mass of 3. The regular hydrogen is the most abundant by far, that is why the mass is only slightly over 1.
The second reason is because it is based on a relative weight compared to the standard of Carbon-12 = 12amu. They simple set up the question: How much heavier / lighter is the object compared to carbon-12? Since things are not always a whole number amound heavier than others, we get decimals.