It's actually based on reciprocal altruism. Quid pro quo, but not necessarily with an immediate compensation.
It should be noted that this concept is based on the notion that nobody should own any means of production privately. These are socialized (instead of being nationalized) and managed by collectives consisting of the involved workers.