Sure, the companies tried the standard approach of just secretly agreeing not to compete with each other for talent, but the DoJ didn't care for that, and so they just do the other thing: pay as much money as is necessary to get the folks they want.
Apple makes about $435,000 in profit (not revenue) per employee, including non-technical employees. If they think that they need to pay staggering salaries to programmers to keep a good thing going, they will absolutely do it. Would they like to pay their programmers a third of what they're paying now? Totally. Would such a salary be fair? Totally. But those programmers would just call a Google or Facebook recruiter and be out the door the next day.