Experiments with actual groups illustrate the point. Pseudomonas fluorescens bacteria quickly suck all the dissolved oxygen out of a liquid habitat, leaving a thin habitable layer near the surface. But some bacteria spontaneously develop a beneficial mutation. These group-saving individuals secrete a polymer that enables bunches of individuals to form floating mats. As a mat, all the bacteria survive, even though most of them expend no metabolic energy producing the polymer. But if the freeloaders get greedy and reproduce too many of their kind, the mat sinks and everybody dies, altruists and freeloaders alike. Among these bacteria, then, groups that maintain enough altruists to float outcompete groups with fewer altruists than that minimum number. The former groups survive, grow and split up into daughter groups. Thus, altruistic individuals can prosper, despite the disadvantage of expending precious resources to produce the polymer.
Interestingly, group selection has been observed in microorganisms: