But what exclusive right does your employer have to your labor? That depends on your contract of course.
So if you signed away exclusive access to your labor, it's fraud. And that's not uncommon - there's often at least a "you will disclose other employment" clause in developer at-will contracts. That said, I think the only consequence of not disclosing is potentially getting fired with cause if you get found out. IANAL but I don't know of precedent for clawing back pay (which would be fitting for actual fraud).
If you didn't, then it's your employer trying to get more than they signed. And in that case, the lie is a necessary evil.
Full-time employees are salaried. They cost the same no matter how much work they do. So full-time employers want them to do as much work as possible. They view time as zero-sum, so any hours you spend on another job are hours you could have spent on them. Even if - as we all know - there are diminishing returns on hours and those hours at job 2 would not produce the same output if pumped into job 1.
So, as always, full-time employers resort to soft power and psychological tricks to exert control over salaried employees. And I'd say it's increasing lately because remote work as shifted the power imbalance and employers are realizing the other side of at-will, salaried employment is that employees can work as little for them as they can get away with so long as they are good enough to remain willfully employed.
They're all very similar, American salaried at-will agreements.
They say that
1. I must disclose any prior agreement that may affect my eligibility to be employed by Employer.
2. I must disclose any outside activities.
3. I am employed at-will.
(2) doesn't mean I can't have another job, but combined with (3) it does in practice.