What is the meaning of $form['cid']['#value']?
cid is the comment id. And this comment checks if it is empty or not. When it is not empty, it means that we are editing an existing comment as opposed to creating a new one and this code doesn't need to run.