For example: if my basic necessities were covered by something like a UBI, I could spend my time teaching math/art/code/whatever. If I were a medieval peasant, to take another example, I'd be subsisting on my own farm and after the harvest (and after paying the lord a hefty amount of it) I might have some time to help neighboring villagers repair their tools. That is to say: the need for survival does not necessarily imply the need to have a society organized around profit-seeking.
That we _do_ live in such a society today is a matter of history, not logic. The structuring of human society around profit-seeking (or capitalism more generally) is a relatively recent historical phase (what, about 600 years, maybe?) -- it was not inevitable and there's no logical reason to assume that it will go on forever.