If gas cost $1.30 at one gas station and $3.40 at another, which one you gonna go to? If the retailer knew they could get software for $15/hr, then that's what they'll pay.
Bingo, you have won the cigar. I did this to make contacts and avoid boredom. I am really not making much money on this. Not enough to pay my mortgage certainly. I suppose I could join the Peace Corp. And I actually looked into this.
But it's not always that lawlike. This argument only makes sense when you remove all intangible value arguments, such as national loyalty and the idea of a company giving back to its community - if for no other reason that to nurture a market for its products. If none of these considerations exist, then sure, it's a great pragmatic argument for maximizing profit. But it's a choice, not some law-like given, and it's a choice that could offset its short-term gain with long-term bad will in the community.
Another problem is, the company has got to be assuming that someone else is going to pick up the slack in the US economy. Otherwise, if the economy goes in the tubes and a significant number of people are on unemployment, and state budgets continue to face shortfalls, then taxes will go up, that company's taxes included, while the market for goods will go down. Unless the company produces the paper welfare checks are printed on.
And finally, remember that workers are consumers are voters. And enough economically disenfranchised voters can get the government to throw its monkey wrench into the lawlike behavior of markets, often with detrimental results to businesses as well as workers.
If the man selling gas at $3.40 was my brother and the man selling at $1.30 was out to take my house and my job, his house and his job, and all my friends' jobs, then yes, I'd buy from the $3.40 man, if quality was otherwise equal.
Honestly, I think modern businessmen have no more foresight than farmers in the dustbowl, destroying the land to raise a single season's crop, without even a thought to the topsoil blowing away - so long as they make their quarterly target revenues, raise the dividend 1/4 of a cent, and move the hotplate under someone else's butt for a week or two.