As Baking Kneads explains, flour not only prevents cookies from spreading too much, but it also gives them height. That's because, in addition to forming a gluten web that allows the baking soda to do its job, flour itself is also a leavening agent, and using more flour can give your cookies a chewy, dense consistency.