The engine behind Open Source is people producing original software for their own benefit (either so they can use it or for entertainment), and then they have this code that can be duplicated for no cost that they could do something with. The actual exchange is generally a result of the creation of the asset, not a cause like in most models, because the creation is independently motivated.
Having ended up with this asset, it is natural to want to make some exchange with it, but there's a substantial cost to trying to set up exchanges involving money, which means there's risk and the expected reward doesn't justify it. Also, selling software is a certain amount of work, and generally work that the particular individuals with these particular assets dislike, which puts the cost to selling it above the benefit from selling it.
But it is perfectly reasonable, with negligible downside risk, to give it to everybody who cares in exchange for other people who are in a similar situation also sharing (maybe) and social networking (i.e., the incremental benefit you get from trading nothing for nothing but making a successful exchange which could lead to lower overhead in future exchanges).