As the dough is baked, the butter melts and creates steam, trapping it in the dough and creating air pockets. Once the dough has cooled, these air pockets become delicate layers of flaky dough. By this point, you’ve realized that butter adds more than flavor—it develops texture.