they needed the key to bring optimus back to life because he's so damn awesome, that is correct, right?
I imagine so. One could theorise that, considering that there are only 2 pieces of the Allspark left, the order of things was this:
Decepticons steal Shard 1 to revive Megatron.
Megatron kills Optimus.
Megatron and The Fallen start looking for The Key to power The Energon Harvester.
Rather than use Shard 2 to revive Optimus, it is used to awaken a very old Transformer, Jetfire, so he can translate the map and help the humans/Autobots find The Key, hopefully before Megatron and The Fallen.
The Key is retrieved and used to revive Optimus, in the hope that he can/will stop The Fallen.
The Key is removed from Optimus before it heals him fully (though we are not sure if thats even possible).
They Key is used by The Fallen to power The Energon Harvester.
Jetfire commits suicide so that Optimus can live. He gives Optimus his Spark (power source? Spirit?) and parts so Optimus can become powerful enough to beat The Fallen/Megatron/Starscream.
The Energon Harvester and The Key are destroyed by Optimus during the final battle.
Thats how I rationalised it anyway. Its not necessarily correct to what Michael Bay had in his mind at the time, but then, its very possible he didnt have anything in his mind at the time, so we are free to speculate 
Remember, there is such a thing as poetic licence (If we hadnt gone the long way and used Shard 2 on Jetfire, he would never have been able to rock up and give Optimus his parts, and the Decepticons would have won), and, also, the fact that we, as viewers, often have more information about whats going on than any single or group of characters in any movie. While it may make sense to us that Sam use Shard 2 on Optimus in the first instance, from their perspective, it may have made more sense to do what they did.
Sometimes you have to let the little things go, like the horrible mutiny of Geography and Political Sciences (Jordan is not linked to Egypt by land you have to go through Israel, the US would have asked for Isreali support first, and maybe from Jordan second. They could also have asked for support from the Egyptians and Saudi Arabians).
Then again, there are some things you just need to go apeshit over (the annoying fucking parents, for example)
Hope i cleared everything up for you... though considering the length of the post... probably not =P