Mycorrhizal allocation determines their function across varying environmental contexts.