Because the number of protons increases in the nucleus. The nucleus has more mass. The nucleus attracts the electrons in a stronger way in the same shell towards center of atom. Thus the size of atom decreases.
As the number of positive charges in nucleus and negative charges (electrons) in atom increases, their attractive forces make the atom shrink. It continues as long as we are in the same shell, that is, same period, from left to right.