Here's what I think would be a better analogy: let's say you run a restaurant in a small town. The restaurant business is booming, and you and your competitors are all expanding, to the point where it's getting hard to find qualified cooks and servers.
The cooks and servers start working to get a piece of the pie. They move between restaurants as higher pay is offered. You desperately need more staff and since you can't find new people, you resort to soliciting the staff at competing restaurants and offering them more money. They do the same to your employees. Average pay rises.
You and the other owners don't like this at all. Cooking and serving was a minimum-wage job not too long ago! This steadily increasing pay is eating into your profits. So you all get together and agree to put a stop to it: you won't try to hire away their staff, and they won't try to hire away yours. Pay stagnates, and you and the other owners get to keep more of your profits.
This is what happened with Apple and these other companies over time, only with computer people instead of cooks and servers. Is it immoral for businesses to collude to artificially hold down wages? I think most people would say yes. Probably more importantly, it's illegal.