I think it is because atoms are so small, you have to measure many of them.. so we are actually taking an average which results in decimals.
Does that make sense?
Why are the atomic masses of elements usually decimal numbers?
2 answers
The answer by John suggests that it is the result of each atom having such a small mass (they do) but I assume your question is why are the masses not whole numbers. That's because the value in the periodic table are the averages of all of the different isotopes of the element weighted for the percent of each isotope in nature. For example, the atomic mass of Cl35 is approximately 35 and all of the Cl on earth is about 75% Cl 35. That of Cl37 is aproximately 37 and it is about 25% of the total.
35*0.75 + 37*0.25 = about 35.5.
35*0.75 + 37*0.25 = about 35.5.