A lot of open source software is written by people working for corporations. Red Hat may have started out as a plucky co-op but it's now part of IBM. MySQL is written primarily by Oracle. The fact that the source is open doesn't mean it's all volunteer work.
That doesn't mean it wasn't a massive transfer of wealth, just that for a lot of it people were paid a fraction of the wealth they created rather than none at all.
Sidenote: Here's a good article about how software developers can wage class warfare. Some tips are: Don't help other people learn things, never write documentation, and make your code as opaque as possible so your boss doesn't get anything from you for free.