Yes it is forbidden to eat 'at your desk', for obvious sanitary reasons, but I never seen it enforced.
But it is ok to eat in the workplace. More than that, company are supposed to provide a dedicated 'break' space with tap water access.
The root of the sanitary reason is obvious, you just have to see the regulation about restaurant and food serving places in France, even if a lot of people are sadly not respecting it.