Why does Tobi put up a goofball facade initially?
Tobi acted like a goofball to hide his true nature. Pein was the leader of Akatsuki, but


   Tobi was the one pulling the strings behind everything so he had to mask his true identity and seem unworthy of investigation.


Tobi made himself look weak and useless, which is perfect for his disguise.