I do this when I bake chocolate chip cookies & these gingerbread cookies & the result is thicker, chewier cookies.
I'm not a chemist but in my opinion this give the butter in the dough time to firm up. Usually you add room temperature ingredients to your mix, usually that means butter. This room temperature element helps the ingredients incorporate evenly. But now you have really soft butter & if you put that in the oven it'll just spread & spread & a thin, pancake-y cookie will result. So stick the dough in the fridge (or faster in the freezer) before diving it out into cookies to be put in the oven. If you're using cookie cutters, roll the dough out first before chilling it.
Let me know if that improves your cookies!
Get more of my better home cooking basics here.