Relationships are indeed a trade, of energy, time, resources, commitment, promises, affection and so many more ingredients. But it's quite more than that, it's more than the sum of its parts. The trouble with seeing it in such utilitarian terms will eventually land one in a position where there's no point in even considering getting into a relationship.
I think the above is pertinent to life in general - it’s kind of the fight against entropy. You don’t put any effort/ energy/ time/ resources into ANYTHING, it will go down the drain, slowly at first, and then all of a sudden - that being your body, your health, your job, your family, whatever.
But I also agree with Alejo, that it is way more than that. To me there seem to also be a philosophical/ spiritual dimension to this - and somehow connected to Free Will, or maybe rather to the concept of progression/ ascension of the soul, which requires constant input/ work/ learning for that to happen.
I am not really able to explain the above better, as I haven’t pondered the question well enough, but maybe someone else has - in which case I would be very interested to hear your thoughts on this.
So being in relationship or not, or wishing to be in a relationship or not, the “way out” is the same wherever you are or whatever you do.