The thing is - that's the way the spell normally works. It's actually an open-ended spell. It doesn't have a thing in it that ends the bargain. It's written as if it were a calling spell, but the fact that it's a summoning spell means that a new dragon is created and vanishes when the spell dictates is end.
Here's the actual wording:
This spell summons a dragon. You may ask the dragon to perform one task in exchange for a payment from you.
You don't have to do anything. If you just cast the 9th level version cold, you put 500 XP on the table and get a completely real copy of a 27 Hit Die Gold Dragon into existence.
At the end of its task, or when the duration bargained for elapses, the creature returns to the place it was summoned from (after reporting back to you if appropriate and possible).
Note: it doesn't "vanish". It simply goes back to where it was summoned from. Which according to the way summoning works - means it flies to a place where there is another version of itself. The only difference between the new Dragon and the other dragon is that one will vanish if it dies - and the other leaves a corpse.
The neat-o thing about the shadow duplicate, is that the place it was summoned from is in fact just the wizard's presence. So you cast the spell, decline to pay it for any services, and then there's a good dragon that thinks of you as its father.
-Username17