It may surprise you to hear me say this, since I am not exactly a fan of pure capitalism, but usually making money is ethically positive. Of course it is not earning money itself that is positive; you don’t do anything good if you inherit money or find it lying on the ground. But I would say that earning money is often correlated with something that is ethically commendable.
Let us suppose that you run a business and that you make some product X. X is of different value to different people, but of course you can only sell X at a fixed price. This means that the majority of people who buy X from you came out ahead in the transaction; despite paying you they are better off then before the transaction. Thus by selling X you are making a lot of people better off then they were before. And increasing the wellbeing of many people, and thus of the community, is ethically good. So if you run such a business, or are paid by one, the fact that you are earning money is an indication that people want to buy the product you make which is an indication that they are benefited by it. And so earning money is often correlated with doing something good.
However how much money you earn is probably not correlated with how much good you do by working. The engineers probably get paid more than the people working at tech support, but that is because there are fewer qualified engineers. Strictly speaking how much good you do is roughly correlated with the value your work adds to the finished product, and that is definitely not correlated with pay (and also really hard to determine in any objective way). Similarly people in a risky business, like those founding a startup, may be paid more, in order to compensate for the risk, but again, that doesn’t mean that they contribute more.
And not all paying work comes from businesses that are good for society. There are basically two ways in which a business may be able to make money and yet still be harmful overall. One way is by generating enough negative externalities (costs passed on to third parties) that they outweigh the value of the products sold. For example, a byproduct of the production process may be nuclear waste, which the business stores in cheap containers underneath the factory (or perhaps in another town). They stay in business for a few years, make some money, and then leave. It is true that people have enjoyed the products they made, but the nuclear waste they produced negates this benefit. Of course if the world was a perfect place then the purchasers of the product would have had to pay for the harm the nuclear waste would result in, thus making the product too expensive, and preventing the company from making money. But the world is not a perfect place. A second way a business may make money and still be harmful is by producing products that are deceptively valuable. In such a situation the consumer buys a product thinking that it will be worth more to them than they pay, but in actuality it turns out to be worth less, and thus most consumers actually end up harmed by the transaction. Obviously such a company can make plenty of money, so long as consumers continue to be deceived about the value of the product, but that doesn’t mean that it, or the people who are employed by it, are contributing positively to society. Cigarettes and exercise machines are examples of this.
Given these considerations it is actually hard to say whether making money is usually an example of positively contributing to society or not. But I choose to be an optimist in this case, and will believe that it does. Now let us apply this thinking to an example of making money that some people claim is close to fraud and some think is just good business: domain name squatting. Domain name squatting is when someone buys URLs (like onphilosophy.wordpress.com) cheaply from the people who are responsible for giving them out, and later resells them for much more when someone wants to use them, often for a business. Is this way of making money ethically good, bad, or indifferent? Well a URL is like a product that businesses choose to buy. Like in the case of products that individuals buy, having a particular URL is of some value to a business. By selling these URLs the people who are responsible for allocating them are thus doing something good for businesses, since most businesses get more value from the URL than they pay for it (assuming that URLs aren’t of deceptive value). Domain name squatters effectively increase the price of URLs. Thus businesses will have to pay more for them or pick a URL of lesser value. In either case businesses are benefited less. Assuming that most businesses are beneficial to society and URLs aren’t of deceptive value this means that domain name squatters are in fact detrimental to society as a whole, and thus domain name squatting is ethically wrong. Now some might defend domain name squatting by pointing out that the domain name squatter benefits in direct proportion to the harm done to the rest of society. That might be a fine utilitarian defense, but utilitarianism sucks. We all admit that many inequalities are unproblematic when they are at least somewhat beneficial to everyone, but making one individual better off at the cost of the wellbeing of others is not desirable, even when that trade is an equal one.