Deerclops aims to destroy all structures and then leave. Note that the only structures counted are the ones targeted by Deerclops directly - collateral damage is not counted, meaning many more structures may be destroyed before Deerclops is "done". Naturally, if the Deerclops is aggroed by the player or other mobs, it will hang around to take care of them first, before continuing to destroy structures or leave.