Dear student,,electronic configuration of chlorine: [Ne] 3s2 3p5.It is not written as 3s1 3p6 because energy of 3s is less than 3p. Hence electrons first enters the 3s orbital and then into the 3p orbital. Although 3s1 3p6 might seem to be more stabe but till the third period the Aufbau principle is strongly followed without any kind of anomaly.