Apple has about 3x what it pays out in salaries left over after paying everyone, McDonald's only has about 1x salary per employee profit. McDonald's would go broke if it doubled everyone's salaries, Apple could afford to do that and still be hugely profitable.
Point taken, I'm sure there are better examples than fast food of companies paying peanuts but earning millions per employee, probably due to huge investments/risks involved. Natural resources and banks come to mind.
Still, there is nothing that should make Apple pay more because they can, they only need to be competitive in salaries, not excessive. If they wanted to compensate employees more, that would probably not show up in these figures as it would likely not be base salary but rather bonuses/stock etc.
"Hard to find developers" just means "Hard to find people who will do X when we pay Y". As for cost of living, if NYC/SF tech companies offer competitive salaries for those areas (like $150k) that must be a fortune for people working remotely from almost anywhere else. So assuming that remote work is quite normal, and the companies accept paying SF salaries to remote workers from everywhere, I can't see how they can fail to find talent.
What are the numbers per employee?
Net income per employee:
Apple: $456,800
McDonald's: $12,530
http://www.wolframalpha.com/input/?i=profit+per+employee+app...
Revenue per employee:
Apple: $2,111,000
McDonald's: $64,320
http://www.wolframalpha.com/input/?i=revenue+per+employee+ap...
Apple has about 3x what it pays out in salaries left over after paying everyone, McDonald's only has about 1x salary per employee profit. McDonald's would go broke if it doubled everyone's salaries, Apple could afford to do that and still be hugely profitable.