Writing a speech before an event is tought. You have to consider the message you want to convey, the audience, the situation. When you are the President, you know that people are hanging on your every word and there is an army of people waiting to jump on any mistake you make.
Everything has to be perfect. Usually scripted to the finest detail. As President you have the luxury of a few speech writers and your own army of support staff to make sure everything goes perfectly.
Watching this video, I can see that President Obama had thought about all the pro's and con's of actually singing Amazing Grace.
It wasn't in the script.
A President singing? Had that been done before?