In all cases, it is not 100% of the money that is wasted uselessly. There is still a few percents that are directly to useful use. Like there some companies or big companies that contribute in some cases in significant open source projects that are used by everyone. But that is more the exception than the norm.