I don't think the government should be able to interfere in this way.
We've gotten so used to government inference everyone thinks its ok.
If the employees were able to apply on their own, what's the harm?
The government ALWAYS, as you characterize it, "interferes". In the U.S. the Department of Justice often determines in the first instance what activities constitute a violation of the antitrust laws, but the reason the government must always be involved is because individuals and companies must resort to government funded and staffed courts to resolve disputes. The government in the form of courts must decide which party should prevail and this can involve determining whether or not an agreement can be enforced or not, sometimes on the basis of whether that agreement is in keeping with the sort of society we want to have. For that reason, the government interferes when a bookie sues a gambler who has welshed on a bet by saying, in many states, that it will not allow its courts to be used to collect money from a wager that was illegal to have been made in the first place.
Here two companies have made a contract with each other that arguably affects the rights of an employee of one of the companies who had no involvement in the making of that contract, and who certainly did not consent to it. Assume that in the absence of that contract the other company would have attempted to recruit that employee by offering a 25% augmentation in salary. In effect, the contract has harmed the employee by arguably improperly removing the fair competition for his services that is the essence of capitalism.
So whether the Justice Department decides that the contract is a "combination in restraint of trade", or the employee decides that he has been harmed by illegal collusion to keep his compensation low, or whether one of the companies sues the other for breaching the contract by approaching the employee, the government is going to get involved.
The alternative, which existed in the distant past, and even today in some parts of the world, is that anyone who thinks he has been harmed by the acts of another gets his friends and relatives together and physically attacks whomever they think did them wrong. Long before governments were instituted among men to organize armies, coin money, or negotiate with other governments, people supported an authority to decide disputes among them. It is what separates us from barbarians.
Additionally, there are many reasons why an employee of Company A would not apply to Company B for a job, not the least of which is that if Company A learned about it, it might fire him to replace him with a more loyal employee it could count on not to defect to the competitor. Once you achieve a responsible role in an organization it is far more likely that you will be recruited to your next assignment than that you apply for it, and for that reason any limitation on recruiting deprives you of opportunity.
At the same time, though, there are situations where it is fair to prevent, for a reasonable period of time, one company from making offers of employment to the employees of another. Courts and governments generally are charged with making judgments about when particular circumstances justify enforcing or refusing to enforce a particular agreement.
In this particular case it appears that Apple contracted with a number of unrelated companies to avoid a hiring war where each company was raiding the employees of the other, setting off an expensive auction for employees with rare skills. It is certainly understandable that these companies would see some advantage to themselves in avoiding such a battle, but it is incontrovertible that another consequence is that the compensation of those with valuable and rare skills would not make as much as they would otherwise. The agreement, consequently, is a violation of the law of supply and demand since the demand has been artificially suppressed. In a free capitalist society we must always be vigilant to ensure that the competition that is the heart of our economy is not circumvented by collusion among competitors, and we entrust that duty to be vigilant to our government.