Transferring a pair of electrons from O to C a double bond C=O is formed. Due to the larger size of Cl overlap between the two atoms Cl-C would be smaller and also the stability of the molecule. Thus a C=O bond is favored.