why are they allowed in MTB races when there not mtb’s
I didn’t know they were?! MTBs are allowed in (most) CX events, not sure it’s true the other way round though. We used to allow them at Beastway (the mid-week East London series) but, although the riders could claim cash prizes, they were not allowed to claim points for the race series.
Certainly at 24hr events they specify no CX bikes (although it’s an increasingly murky distinction given the rise in popularity of 29ers).
what are the advantages of them as well over mtbs
Depends on the course. On a typical CX race course, they will thrash MTBs by a country mile – higher geared, lower rolling resistance, lighter.
On normal off-road the differences are much less marked and it depends to a degree on the rider. Generally the MTBer will beat a CXer downhill. Uphill it varies but as a general rule the CXer will win, either by getting off and running (on steep techy stuff) or by simply *having* to put more effort in due to the higher gears. Similar to the way that SSers often beat geared riders uphill.