It's mutual benefit. The optimal social situation is a win-win scenario in all interactions. In this interaction, both organisms benefit from each other's presence, and do better than they would do alone.
I know this is supposed to be a shitpost anyway but they're absolutely not "sharing" resources. Plants can (and do) out-compete and kill each other constantly
Although, in this picture, the fungi would be mycorrhizae, which do form symbiotic relationships with plants. In fact, fungi enabled plant terrestrialization, i. e. we probably wouldn't have trees in their current form without fungi.
It is called symbiosis. Both sides benefit. So, there is profit for both.
Formally in economy most transactions are of the same property - benefit for both sides. You buy a car, both car seller and you benefit: it is obvious for the car seller, but for you it is much cheaper to buy a car than make it yourself.
B/c the Prisoner's Dilemma is a vast over-simplification that ignores that we tend to see the same people every day, and if you go even one step further there is basically mathematical proof that cooperation tends to work better.