Moderators are members of the community too. Sometimes extremely active members of the community. If they recused themselves from performing actions on every post they're involved with, that may leave many flags unactioned until an uninvolved moderator can take care of it. On smaller sites, that may leave no one available to work the flag.
In this particular case, by answering the question the Moderator probably already considers the question on-topic for the site, else they wouldn't have answered it (and would have simply closed it straight away).
I would hope, however, that most Moderators are wise enough to stay out of situations where there is an issue with their moderation. (For instance, if that self-same Moderator came here and deleted this question.) Like nearly everything else on these sites, Moderator actions are logged; there's really no way to hide.
If you truly believe that a Moderator has acted in bad faith, please see: What recourse do I have if I believe a moderator has abused his/her privileges?