Many biological fluid transport networks are optimized to redirect flow as dictated by the needs of the system. By locally tuning the conductances of links (whether via genetic evolution or dynamic adaptation) of the network, venation networks in animals, plants, fungi, and slime molds control the spatial distribution of water, nutrients, oxygen, or metabolic byproducts. In the same spirit, allosteric proteins globally adjust their conformation upon binding a ligand in order to control the activity of a distant active site. Here we explore how such systems achieve a specified complex function in two contexts: pressure redistribution in flow networks and strain propagation in mechanical networks. We investigate computationally the maximum complexity of a tuned function that can be achieved as a function of network size. We find that both flow and mechanical networks display qualitatively similar phase transitions in the complexity of functions that can be tuned. Further, we identify the structural features responsible for function in these tuned networks. Using persistent homology, we show that networks tuned to perform such functions develop characteristic topological features that are similar for different networks that perform the same function, regardless of differences in the local link connectivity. These features correlate strongly with the tuned response, providing a clear topological relationship between structure and function.