Chilling the dough helps solidify the butter, which prevents the cookies from spreading too much during baking. It also allows the flavors to develop and meld together, resulting in a better texture and flavor profile for the cookies.