Metagenomics has revealed hundreds of species in almost all microbiota. In a few well-studied cases, microbial communities have been observed to coordinate their metabolic fluxes. In principle, microbes can divide tasks to reap the benefits of specialization, as in human economies. However, the benefits and stability of an economy of microbial specialists are far from obvious. Here, we physically model the population dynamics of microbes that compete for steadily supplied resources. Importantly, we explicitly model the metabolic fluxes yielding cellular biomass production under the constraint of a limited enzyme budget. We find that population dynamics generally leads to the coexistence of different metabolic types. We establish that these microbial consortia act as cartels, whereby population dynamics pins down resource concentrations at values for which no other strategy can invade. Finally, we propose that at steady supply, cartels of competing strategies automatically yield maximum biomass, thereby achieving a collective optimum.