That may sound bizarrely unfair to you, but elsewhere (Germany) it's actually the law (but only for inventions/patents, not other IP).
The employee has to tell the employer about any patentable idea, even if not in the general field of his employment, and even if having occurred after hours.
The employer can then either claim the patent (but has to pay something), or he can release the invention (and the employee can patent it on his own).