Whether a pet is in the front row or back row plays a major role in how a party will do. The simple explanation as to why certain pets go into the front row and back row is that they gain benefits depending on their position. Pets in the front row gain a speed boost of 20%. Pets in the back row deal 20% less damage (except mages), but are targeted less often. Pets in the front row are targeted with a 65% chance.
Whether a pet should go in the front row or back row isn't a simple answer. While this guide tells you where to put the pets when you start out, this changes the furthur into dungeons you get. The reason being is that the dungeons become more complex and require proper planning.
For example, at the start, there is no problem with putting rogue, assassin, and defender in front, while your support and mage in the back. This is a logical choice to make, as putting rogue and assassins in the front means they get additional speed, with plays a key role in a pets damage outpit.
Pets with high speed act sooner in the turn order, can gain more actions within a turn, and deal more damage to their target if their speed is higher. All of this points to higher dps, meaning one would want their main damage dealer in the front. However, there is a problem with putting them in the front.
Pets in the front are targeted more often by enemies. Despite having higher damage, an enemy could survive and attack your damage dealer, potentially killing them. Defenders have a 50% chance to redirect these attacks to them, but that means half the time your damage dealers are taking a hit.
If they are in the back, the chances of them dying are reduced, but so is their damage output. Deciding if you have to put the pets in the back or front can mean the difference between good damage with pets dying faster or not enough damamge and pets taking too much damage.
For the most part, your mages will always be in the back. While in the back, they don't get a speed bonus, but they don't suffer a damage penalty. They are also targeted less often, meaning they are more likely to survive. As their ability allows for multi-attacks, keeping them alive is a priority.
Another thing to note is that supports benefit from increase speed as well, but their heals depend on their damage. By fielding a support with damage gear, they can keep your other pets alive longer, but they are at risk of dying themselves. This is why you normally keep them in the back line.