Pet AI is stupid. Despite the best efforts of prgrammers, pets invariably attack the wrong mob or pull adds you don't want and generally do dumb stuff when set to defensive.
Putting the pet on passive and managing the extra shortcut bar to manually control your pet is one way to ensure it's attacking the mob you want. A pain in the *** way!
The easy way is to add the "petattack" command to a macro for your most commonly used ability and keep the pet on passive. This way, the your pet attacks what you want it to, only what you want it to, when you want it to, without the need to click or bind extra keys.
I am lucky, or maybe hardcore, enough to have a programable controller. I have one button set to push 2 keys. It works like so - "Press 5, wait 50ms, release 5, wait 50ms, press ctrl, wait 50ms, press 1, wait 50ms, release 1 , release ctrl". It's basically a macro but, on my hardware, not in the game.
If Trion would please just add the "petattack" comand to the list of macro commnds, then everyone could keep accurate control of thier pets and I bet you, we'd all see alot more of these faithfull companions running around because at this time, most people avoid useing them because, they are, well, stupid.