Your troops return into Bunker without attacking or occupying of a hostile Base or Repository in the following cases:
1. Your opponent has activated Total Protection over his Base.
2. Your opponent has relocated his Base to another place on the global map.
3. The targeted Repository had depleted before your battle squad has arrived to capture it.
4. Your units will return to the Bunker without attacking a Repository if your opponent loses his control over it. Please note that it is impossible to attack a Repository which isn't controlled by any player.
Many players use such a tactic to minimise their losses: when the player who keeps some Repository notices that this Repository was attacked several times, he recalls his reinforcements remaining it unclaimed.