How is it not professional if it is in his contract? His boss had no choice but to fire him.
I once worked for a company where it was policy to terminate employees who sought employment with a competitor. It did not matter if you landed a job or not; just asking was grounds for termination. Who ever came up with that policy as a jerk wad, but policy is policy. You accepted it as a term of employment.
that cannot be legal, and if it is is completely unethical. this is why no individual should ever consider themselves obligated to be loyal to a corporation