Well, I think you're right in that they probably wouldn't know unless I told them (assuming it doesn't directly or indirectly encroach on my job time)
I'm not sure exactly the definition of external income in my case, but I know external employment counts and I've also heard coworkers brush off 1-off side gigs because they'd have to fill out paperwork.
In this case it is a company policy, not a legal matter. Even if you signed a contract the contract has to be legal and valid under the state & federal laws governing it, the company and the person/people involved. Many companies put clauses in contracts which they know are unenforceable because lay people won't know the difference and are just fearful of being sued, hell many attorney's don't know.
The companies recourse here is to terminate you for violating company policy, which could open them up to a wrongful termination suit for trying to enforce a policy that may or may not be legal in that state. The company suing the person in this case has no value nor any outcome where it is a net positive for the company, and the company knows that and they just hope you don't.
So that when you ask for a raise, they can point to all the side cash you earn and add it to your normal pay and say meaningless stuff like, "well, you're making a lot more money already than we pay people of your position."