first you should know how loot is calculated. The winner of the battle takes loot from the loser.
Now, the question is how much. The objective of the attacker is to win as fast as possible. Therefore, winning the battle instantly would net the attacker 100% of the enemy equipment, minus some random component. Winning the battle in the last minute would give you 0% loot (although i think it's now a minimum of 25%)
The defender's objective is to delay the battle as long as possible. Therefore, if the attackers fight until the timer has run out, the defenders would get 100% of the equipment the attack was carrying.
Admittedly, retreating as defender doesn't make a lot of sense. It's more like an option to say "i dont care any more". Every minute lets you keep a few pieces of equipment more. So just hang in there.
As an attacker, it's way more interesting. If you will probably lose the fight, it's better to retreat sooner than later. However, if you think there's a small chance you could win it, you could play it risky.
The reason for that system was that attackers often just camp the spawn while defenders are more like "meh, i'll attack then". This is supposed to make attackers attack and defenders defend.