In the Name of Allah, The Most Gracious, Most Merciful

"The Messenger of Allah (PBUH) enjoined Zakat-ul-fitr on the one who fasts (i.e. fasted during the month of Ramadan) to purify him from any indecent act or speech and for the purpose of providing food for the needy."

[Abu Dawod and IbnMajah]

Why is Zakat-ul-fitr prescribed? It purifies the Sa'em from every error like unintended sudden look at a woman, for instance. One feels that he did something wrong, and he should erase that fault, so Zakat-ul-fitr erases it. In addition, it provides food to the needy. 
 

Praise be to Allah, the Lord of Creations