A metal enclosure can make contact with an exposed ground like that and turn the entire box into an EMI shield.
100% contatact to the box along the edge will offer better EMI than a box connected in just a few places. The rest of the gap appears as a slot antenna to EMI.
Guard rings are also used to prevent current leakage across the suface of a PCB into sensitive electronics. (You find out how useful this is quickly if you are measuring a 10G
resistor at 9V)