He is only making society better if the value he is creating is larger than the value he is extracting.
You can build a regular home, get paid $5 million for it, the net act was probably negative for the system.
It's the same for companies turning profits: it's entirely possible to make profits in a system while actually shrinking the overall pie. This is common when certain activities are externalized (i.e. pollution).
Capitalism, broadly, does create a bigger pie, but it's a very uneven process and the true value creation doesn't always happen where the value is created. Value capture happens where the power is.