Microbes are predominantly found in surface-attached and spatially structured polymicrobial communities. Within these communities, microbial cells excrete a wide range of metabolites, setting the stage for interspecific metabolic interactions. The links, however, between metabolic and ecological interactions (functional relationships), and species spatial organization (structural relationships) are still poorly understood. Here, we use an individual-based modelling framework to simulate the growth of a two-species surface-attached community where food (resource) is traded for detoxification (service) and investigate how metabolic constraints of individual species shape the emergent structural and functional relationships of the community. We show that strong metabolic interdependence drives the emergence of mutualism, robust interspecific mixing, and increased community productivity. Specifically, we observed a striking and highly stable emergent lineage branching pattern, generating a persistent lineage mixing that was absent when the metabolic exchange was removed. These emergent community properties are driven by demographic feedbacks, such that aid from neighbouring cells directly enhances focal cell growth, which in turn feeds back to neighbour fecundity. In contrast, weak metabolic interdependence drives conflict (exploitation or competition), and in turn greater interspecific segregation. Together, these results support the idea that species structural and functional relationships represent the net balance of metabolic interdependencies. 