There is no way for another player to know exactly where you send your troops.
Depending on how long your support troops had been in the other city, they may have spied it and seen them there, and then attacked. Other than that, they may have guessed you would dodge your troops and attacked the most likely city for you to support, or perhaps it was merely a coincidence. When dodging, it is always best to use transports and move your troops totally off the island, so that the chances of that happening are lowered. You can also dodge by attacking another city, or by sending out a troop movement and cancelling it again. In both of these situations, your troops are never actually in another city so there is no chance that they will be hit.