The money you make comes from somewhere- generally customers who are parting with it. Why are they parting with it? Because they prefer what you're buying to the alternative.
People spend, in the aggregate, because it makes their lives better. Even hoarders drowning in needless stuff are spending the money to assuage the pain they would feel if they didn't.
The vast majority of software has a serious positive impact on the customers lives. We may wonder about Instagram, but instagram made a LOT of people happy. Making people happy is a positive benefit to society.
Plus, lets remember what money is. Money is a medium of exchange, its not the thing itself. It is a medium for trading your labor or your intellect. A ditch digger rents his body out at work in exchange for money. When he buys shoes, the money is simply they conveyance of the value from digging the ditch to the person selling the shoes.
When a software developer uses his brilliance to come up with a new program, he's trading his brainpower for whatever he ends up being with that money. Money is the medium that enables efficient transactions where barter failed. That's all.
Money is really another way of saying life.
People don't trade their life away, generally, except where it is profitable.
You make a billion bucks by making something people want? You've improved their lives probably by 7-9 billion dollars worth.
$7 for a movie? Worth more than $7 in entertainment to the person buying it... or they wouldn't buy it.
You don't get to be a millionaire by making people miserable.
(and I need to get a blog going, I think my comment is longer than the original article.)