For several years, judges were not allowed to play in any events that they were also currently working. And this is still true for any event that uses the competitive REL (Grand Prix Trials, Pro Tour Qualifiers, day one of a Grand Prix) or a professional REL (day two of a Grand Prix, Pro Tours, and Worlds).
However, at all regular REL events (prereleases, Friday Night Magic, most other local events) judges can both run the event and play in it. This change was done for a few reasons. One is that it gives judges more opportunities to play. Almost all judges started out as players, and we don’t want to take so many chances for them to continue doing so. This also allows players to see judges as players as well. Another reason is that the judge can sometimes be that eighth player necessary for the event to become sanctioned.