Protien content is the difference. Cake has the least, AP is a medium protein and Bread flour is the highest.
As I recall, our wonderful government specified the measurement in grams of protien per 1/4 cup of flour. This must have been during the time we supposed to transition to metric because it strikes me as silly to measure grams (metric) per cup (English). Further, because of this choice of measurement and the rounding rules, you can sell most any flour as any other. Below are some notes I made a few years ago, from Cookwise if memory serves. I don't know if the rules have changed.
cake flour has a low gluten content for tender cakes. usually less than 8 g per cup, but still averaging at 3 per 1/4 cup.
all purpose flour should be from 8-10 grams per cup and in the modern system rate about 3 g per 1/4 cup.
bread flour should rate 12 to 16 g per cup but are still often rated at 3 on the current scale. Producers are now trying to get them to rate 4 g so you can see the difference.
The reason flours are sold in bulk and in boxes has more to do with styles of cooking in given areas. Most areas use more AP and Bread flour so they are sold in bulkier quantities. Cake flour is more specific use and sells less, so a smaller box is a good choice. I understand that in the south where low protien flours are more popular, you can buy it in bags.