Walton and Gates made a lot of money because they helped a lot of people. Profits direct businesses toward activities that increase wealth. The people of a nation will be better off if their resources are used to produce goods and services that are highly valued in comparison with their costs. This is precisely what profits and losses do in a market setting. Profits and losses direct business investment toward projects that promote economic progress and away from those that squander scarce resources.
Market prices bring personal self-interest and the general welfare into harmony.
As Adam Smith noted, the remarkable thing about an economy based on private property and freedom of contract is that market prices will bring the actions of self-interested individuals into harmony with the general prosperity of a community or nation. No central authority is needed to tell business decision-makers what to produce or how to produce it. Prices will do the job. No one has to force the farmer to raise wheat, or tell the construction firm to build houses, or convince the furniture manufacturer to produce chairs. When the prices of these and other products indicate that consumers value them as much or more than their production costs, producers seeking personal gain will supply them.