The dough is very soft with a high ratio of butter and sugar, also molasses, which is an invert sugar (syrup) and that is what makes chewy cookies. So for the best results chilling the dough gives the flour time to hydrate, the butter to firm, and the syrup time to thicken. Once the cold cookie dough goes into the oven. It will warm and bake slower than warm dough, allowing the baking soda to do its job of puffing up the cookie and forming its shape before it melts out flat. That being said, if you are looking for a flat cookie, go ahead and bake the dough at room temperature. It will remain pretty chewy because of the molasses.