What's the use of powering up any Pokémon? Pros are that your Pokémon will do more damage over the course of the fight and more importantly it will be placed higher up on the gym, making it harder to drop out.
Let's take a level 10 gym as an example, some people might start attacking it for a while but after realizing how long it will take to take it down or maybe because of lack of time they might just knock off a couple of Pokémon. Pokémon with least CP will be knocked first so the higher CP Pokémon will stay on the gym for longer period of time. That's pretty much it.