A remaining challenge within microbial ecology is to understand the determinants of richness and diversity observed in environmental microbial communities. In a range of systems, including activated sludge bioreactors, the microbial residence time (MRT) has been previously shown to shape the microbial community composition. However, the physiological and ecological mechanisms driving this influence have remained unclear. Here, this relationship is explored by analyzing an activated sludge system fed with municipal wastewater. Using a model designed in this study based on Monod-growth kinetics, longer MRTs were shown to increase the range of growth parameters that enable persistence, resulting in increased richness and diversity in the modeled community. In laboratory experiments, six sequencing batch reactors treating domestic wastewater were operated in parallel at MRTs between 1 and 15 days. The communities were characterized using both 16S ribosomal RNA and non-target messenger RNA sequencing (metatranscriptomic analysis), and model-predicted monotonic increases in richness were confirmed in both profiles. Accordingly, taxonomic Shannon diversity also increased with MRT. In contrast, the diversity in enzyme class annotations resulting from the metatranscriptomic analysis displayed a non-monotonic trend over the MRT gradient. Disproportionately high abundances of transcripts encoding for rarer enzymes occur at longer MRTs and lead to the disconnect between taxonomic and functional diversity profiles.