It has to do with protein
I tend to assume every recipe calls for all-purpose flour, since that's usually the only type of flour I have in my pantry. But this assumption often comes back to haunt me. That's because there's a big difference between all-purpose flour and cake flour, and, in most recipes, you cannot substitute one for the other. But what exactly is the difference between cake flour and all-purpose flour? And is it at all possible to substitute all-purpose flour for cake flour if that's the only type of flour I have on hand, or should I just suck it up and buy cake flour, too?
Let's start with what all-purpose flour and cake flour have in common. Both are wheat flours, meaning that they're made from the same type grain and are fundamentally processed the same way: milled into the fine powder we know as flour. But, as Harold McGee explains in On Food and Cooking: The Science and Lore of the Kitchen, not all wheat flour is made from the same type of wheat. Some wheat is harder than others, which changes some of the basic nutritional components of the flour itself.
So even though you probably think of flour as a starch, the difference between all-purpose flour and cake flour actually comes down to protein content. All-purpose flour has a higher protein content than cake flour: It's about 10 to 12 percent in all-purpose flour versus 7 to 9 percent in cake flour, depending on the manufacturer. And the reason one type of wheat flour has a higher protein content than another is because of the type of wheat used. Cake flour is made from a softer wheat with a lower protein content than the wheat used to make all-purpose flour.
As McGee writes, "High-protein flours absorb substantially more water than low-protein flours, and so will produce stiffer doughs with the same proportion of water." That's why cake flour, which has a lower protein content, is better for cake recipes, where you want the dough to be soft and pliable and moist.
That fundamental difference in protein content is also why it's kind of impossible to substitute cake flour for all-purpose flour; it's hard to add more protein to a flour. You can, however, replace cake flour with a mix of all-purpose flour and cornstarch in a pinch. As Kelli Foster writes for The Kitchn, "Take one level cup of AP flour, remove two tablespoons, and then add two tablespoons of cornstarch back in." Sift the two powders together so the cornstarch is evenly distributed, and you'll have something that kind of resembles cake flour.
But if you're baking enough that you see cake flour repeatedly in recipes, it's probably best to just suck it up and buy a pound or two of the stuff. It'll make your life easier and your baked goods taste better.