In EVE Online, for most of the game's history, NPCs would lock onto one target and then absolutely refuse to engage any other targets, regardless of where the damage was coming from. This allowed a single player with a heavy tank and pathetic offense to enter a mission first, get all the NPCs shooting him, and then have his glass cannon friends come in and mop them up. This did occasionally require some forethought, since missions would often spawn new waves, which would randomly select a new player to engage, so the glass cannons occasionally had to leave and come back. This AI also meant that ships that relied upon drones to inflict damage could use all of their powergrid and CPU to fit heavy tank and forego any weapons, since drones don't use a ship's fitting resources.
A relatively recent update to the game reworked the AI so much now that many people that once used drones in missions are complaining that their drones die too easily since the AI will almost immediately target drones once they're launched. AI are also programmed now to favor ships of comparable size, so NPC frigates will prefer to attack other frigates over battleships, while NPC battleships will favor the largest target they can see, rather than wasting their shots on a small, fast ship that they can barely hit.
In Runescape, the enemies will attempt to follow a straight line to their target (i.e. you), so it is often possible to stop them in their tracks simply by hiding behind something, even a torch. This may be deliberate, as the only practical method for archers to level up is to get a target on the other side of a table, fence, or similar obstacle, and proceed to turn the target into a pincushion.
Mages can use the same strategy. Also, your character can also get stuck behind stuff, since you walk by clicking on where you want to go. In other words, you can also get this problem, though the player can guide their character.
In Guild Wars, one of the quests involves a 1 on 1 fight against an Evil Twin who is modestly stronger than you, and has the exact same skills on his skill bar that you do. The primary (and intended) way to beat him is to invoke his Artificial Stupidity by taking skills useless for a duel, and/or by taking good skills that he will not actually use. For example, it's entirely possible to get the Evil Twin to sacrifice enough of its health that you need only give him a cherry tap to win.
The Artificial Stupidity of henchmen in Guild Wars is acknowledged in the endgame area of Prophecies, where Reyna reminisces how she often would use her single-use resurrection, not on a player, but instead on another henchman who would ultimately die trying to resurrect other henchmen.
It's actually an established tactic as Squishy Wizard to go for cover, because spells from skills can bypass objects but weapon damage cannot. While the pure melee Non Player Characters indeed have a working pathfinding, all others will nuke the wall ad infinitum and can be picked off one by one. Of course, the same goes for your henchmen and minions—with the latter ones being especially frustrating because you cannot order them to stop.
City of Heroes' enemy AI is usually pretty good, but some of the NPC allies you get on certain missions are appallingly dumb. Fusionette, a recurring NPC, does an unfortunately good imitation of a novice player with her tendency to attack too many enemies at once and get clobbered.
And in City of Villains, on the timed "Mayhem Missions", it's often possible to spring a NPC villain from jail for a little extra firepower against the hordes of police and heroes trying to stop you. Which is fine, except they often have an annoying glitch where they stand in front of some easily-destroyed object without attacking. No wonder they were arrested so easily...
Even worse (this is less of an issue with player pets than NPC villains, simply because they're replaceable), if you've been smashing things they tend to get in on the action, which might be good... except that they don't understand the concept of "explodes upon destruction". They can knock themselves out with no enemies in sight.
Mastermind pets are incredibly stupid as well. For example, if an enemy NPC tries to flee, your pets will chase after it. Once that mob is dead, they will come running back to you. All the while completely oblivious to half the map's enemy NPCs chasing and shooting at them.
In La Tale enemies will follow and attack the first player character they see, regardless of threat level or feasibility of actually doing damage. They will ignore anyone else unless they don't get a chance to attack for at least a minute or the character moves out of range. This can be abused while in a party to kill vastly more powerful monsters than you would normally stand a chance against by having one character act as bait, run like hell, and climb a ladder just out of range. The rest of the party can attack the monster with impunity until it finally gets bored and goes after someone else. Rinse and repeat and you can defeat even mobs of high-threat enemies with little risk.
World of Warcraft has two types of situations where your character is 'used' by the computer: either when fighting/aiding a doppleganger, or when mindcontrolled by certain bosses. Dopplegangers will sometimes use abilities with no cast time, but will almost always fight in melee range and spend most of the time just hitting with their melee weapon. Still a little threatening if the copied player is a Rogue, not so effective if they're a Mage whacking away with their staff. For the latter situation, while mindcontrolled your character uses abilities almost constantly and somewhat randomly, and often makes interesting choices (for instance an AI controlled Paladin using nothing but 'Exorcism' - a mediocre damage spell that usually only works on demons and undead - over and over on a fellow player). One particularly weird case showed the mind-controlled character apparently deciding Screw This, I'm Outta Here!, and using a spell to teleport themselves to a different dimension. One constant is that they tend to use all cooldown abilities. Which due to their other actions is not necessarily dangerous, but does deprive you of them.
Particularly amusing is when the boss makes the player's character use an ability that breaks the mind control. The same ability that the player would use in that situation if they had control of their character.
At least some enemies capable of mind control seem to have a keen interest in Archaeology (or else are very curious about what all the buttons do), as they will often make the mind-controlled character use the "Survey" ability. Not only does survey have a cast time, but is also not a combat ability in any way, shape or form.
Pet battles in WOW fall heavily into this. If a boss-level pet has a very powerful move (that either hits all your pets, heals itself for a large amount, damages you for a large amount, stuns you, or whatever) that has a cooldown, it WILL use the move as soon as it is available, even if right beforehand you use something that makes you immune to it. You can cheese a lot of the pet battles this way.
Dungeons & Dragons Online allows you to use computer-controlled hirelings that have a tendency to charge off into the distance on their own to attack bad guys. Bad enough, except they tend to run through deadly traps on the way. Or just stupidly stand IN the traps until dead. Particularly annoying when hireling clerics (healers) just stand in the trap attempting to heal themselves rather than move out the way first (and the traps deal way more damage per second than the healing so they just die anyway).
Puppetmasters in Final Fantasy XI Online will often run afoul of this trope. Their automatons can be configured for various roles, two of which are the Soulsoother and the Spiritreaver.
Soulsoother will cure status afflictions and heal, in that specific order, which means that it will always remove that weak Poison or Silence (which has no effect on a non-casting job) instead of a 900 HP cure when the player is near death. This same automaton also has an ability to deal damage based on the amount of damage it received, yet any damage worth mentioning is almost always healed by it prior to using said ability with an overkill heal... (unless its cast timer is down at that moment)
Spiritreaver will mainly cast highly damaging spells, and it attempts to do so intelligently: it can determine up front if a spell will land, and choose a more effective spell if not.. 'effective' being the ability to land a spell unresisted, not the amount of damage dealt. That the target cuts magic damage by 90%, or even absorbs magic damage and gets healed by it, is ignored. When this automaton gets below 75% of maximum MP (due to casting those damage spells), it will replace said spells with MP draining spells if the target has MP, even if these are so ineffective as to COST more MP then they gain. And it will do this until it either gets above 75% MP or it runs out of MP. If it gets damaged in the process, it will alternate HP draining spells with MP draining spells, which are equally ineffective as they share the same resistance mechanism.
Dynasty Warriors Online. Hoo boy. For the standard mooks, it's no surprise the A.I. isn't all that good. For computer controlled player characters, it almost becomes insulting. Here's a quick laundry list of why they're no good as enemies or allies:
1.) They have their priorities massively skewed. They always target bases only. Always. Even if it's the wrong game mode, they, like a baseball player, head straight to base.
2.) They don't attack or block nearly often enough. Where a player would be blocking an attack or taking advantage of an opening, A.I. will just watch you. Don't be fooled by the blocking stance they take, when moving blocking doesn't work, they just use it so they face you. Also, in an inversion of Secret A.I. Moves, there are some moves they just can't seem to grasp using.
3.) They are directionless and cannot be commanded. You may wonder "If they aren't that good, why would you want to command them?" Well, because their priority means they attack bases, and there are game mode when that is how you win. But, if you go into a base they are trying to capture you can't lead them anywhere without using enemy mooks so they chase after you. If not, then they will not move at all until they find an enemy to chase the base is captured and they go after a new one. Depending on the base type you may not have to worry about directing them, or you may get annoyed because it would be really nice to have their help attacking a tower.
And, finally, the strongest enemy type you will face, musou generals who are the original characters from dynasty warriors, have this exact same A.I. On one hand they can take you out with about 3 swings unless you're a tank. On the other hand, they have the same restrictions as above and thus are just as dumb as stated above. Were not for the Instant Death Radius they have they would be considered a joke.
Dream Of Mirror Online had the Easy Oak mission; you had to escort the injured Easy Oak back to his wife. Sounds mildly difficult, right? Well, you had to escort him back through a cave full of monsters, all stronger than Easy Oak. Despite saying he's injured, Easy Oak literally attacked every enemy he came across, making this extremely frustrating. He would even go back to go and try to kill a monster.
Final Fantasy XIV has the Arcanist class and its two jobs, Summoner and Scholar, which rely on summoned pets to deal damage (for Summoner) or heal (for Scholars). They are all, universally, stupid as hell. You can take manual control of them, though.
Firefall has horrifyingly stupid AI. Enemies will desperately attempt to catch up and attack a player that is within optimal range of their weapons. In a game where the player characters have agility and jetpacks, this is a dumb idea, ESPECIALLY regarding the flamethrowers. Some enemies are forced to charge their attacks to deal massive damage, at the cost of making a high-pitched whine or a low rumble while charging. If the players can easily get to cover or dodge, the AI will not hold the charge in and the attacks will constantly miss, making the overpowered sniper and dreadnaught equivalent to big stupid damage sponges with decorative rocket launchers. Worst of all, the enemies don't work as a team, each AI-controlled unit trying to destroy the player that drew the most agro as a threat. With a small team, you can take down a horde of enemies that outnumber and overpower your squad, as long as you help each other fend off the spam attacks.
Earthbreakers are the only chosen in the game so far who use their jump jets and energy waves to ludicrous levels. But in the end, they're just fake difficulty, adding unfair attacks to a dumb AI.