Why did Tobi use Kurama in his attack? After perfectly timing the Release from Kushina Uzumaki's body, Tobi attacks the village using Kurama, the Nine Tails, in chapter 501.

Why did Tobi suddenly decide to use Kurama to attack the village? He was going to need Kurama for his 'Moon plan' as well. So why did he not just take it and leave?
Chapters 501-502 never give or imply any particular reason for why exactly Tobi/Obito would attack the village at that time. Certainly, the smartest strategic choice would have been to simply extract Kurama from Kushina and immediately run for it as far and fast as they could. 

The most straightforward reason is simply: rage. The Uchiha are famous for their fury, once their blood starts boiling, and it may be he simply saw red so went on a rampage with the most devastating weapon he had on hand. Remember that he had just been to Rin's grave and seen Kakashi there, reviving all those old, tormented memories, and from there had to immediately battle Minato. Minato was probably the most powerful and wily opponent he'd ever faced until that point, so battling him must have been frustrating. The combination of these events in such quick succession: boom!