By docking the dough, the cookies get baked more evenly in the oven. It also helps to keep the surface flat while baking the dough, preventing it from shrinking or getting winded during the process.