Cooperation, the mutual benefit that individuals of different species obtain when they interact together, is ubiquitous in nature. Despite their importance, most of all current ecological theories have been formalized focusing on negative interactions such as competition or predation. The role of cooperation, or other types of positive interactions including facilitation and mutualism, has not been fully addressed, or, if so, always in combination with negative interactions. This fact limits our understanding of the unique features by which cooperation as opposed to competition promotes biodiversity. To address this gap, we introduce here cooperation into structural stability, a general framework to understand how species interactions and environmental variability determine the long-term persistence of species within communities. Compared to a pure competitive case, cooperation promotes three distinctive features. First, cooperation increases the opportunities for species to coexist. This feature increases the persistence of species with contrasted phylogenetic, functional, and demographic strategies that the environment would otherwise filter. Second, cooperation creates intertwined biodiversity where the existence of some species begets the presence of others. Third, cooperation promotes multistability by changing the dynamics of community assembly due to variations in environmental conditions. In conclusion, we present a fully operational framework to understand the unique ecological roles of cooperation in nature. It indicates that cooperation as opposed to competition maximizes the maintenance of biodiversity.