Wealth is not a zero-sum game. If I take two lines of code and put them together, I've created something of value that I might be able to sell.
Wealth is created all the time out of thin air. It might take the form of an innovative new technology, open source code, or even art. It might be because you bought raw materials and built a house, and the subsequent value of the house is greater than the costs that went into it.
Scale that up, and you can create vast amounts of wealth without ever taking it from anyone else. The local coffee shop didn't steal $5 (well, $10, but who's counting) from my wallet; I pay it willingly.
This very common idea that if one person has wealth then they must have taken it from someone else is simply not true.
There are just as many fair and honorable ways (perhaps more) to make wealth as there are the opposite.