I always take a grain of salt when I hear things like 'the GM should be the best <x> at the table.' Yeah, that's a good theoretical, maybe even a good goal, but the biggest effect I've seen with statements like that is to intimidate otherwise capable people away from GMing. But be that as it may.
I'm pretty much repeating/rephrasing what others have already said here, but the main thrust of it all is that
the battlefield tactics of the NPCs should fit the NPCs - smart ones play smart, dumb ones play dumb...although I'd qualify that with aspects about role and personality: brutes are going to move in and bash, soldiers will be more canny, artillery will back away from melee whenever they can. Goblins will be shifty (pun intended), using position to best advantage, that kind of thing.
(In the same way, the roleplaying of the NPCs should fit the NPCs, according to role, importance, and personality, but I digress.)
Tactically, I'll do what feels right and natural for the situation, given the type and goals of the NPCs: in my current campaign, the fighter player noted that it was six or seven fights before he got to make a single opportunity attack...which took me a bit aback, although when I thought about it, the situations were such that provoking an OA never came up, due to several factors (primarily being the fighter pretty much ever had only engaged either melee types, or caster who were already so damaged they didn't dare provoke under any circumstances). Nevertheless, I did take care to provoke one of the very next OAs from the fighter that I could (IIRC, it was a fatal error for the NPC when the fighter rolled extremely well for damage). I do what I can to encourage the PCs to strut their stuff.
So yes, it pays to be a good tactician - not so you can outmaneuver the PCs all the time, but to be able to gauge the NPC actions and reactions according to different levels of competence and motivation. Just like roleplaying.
