C. It suggests that magpies benefit from the relationships.
By describing the relationships that magpies form with people as an "investment," the author implies that these relationships are beneficial for the magpies, potentially providing them with advantages that support their survival, given their challenges in securing a territory and breeding.