The main purpose of Zakat ul-Fitr is to provide those who fasted with the means of making up for their errors during the month of fasting. Zakat ul-Fitr also provides the poor with a means with which they can celebrate the festival of breaking the fast ('Eid ul-Fitr) along with the rest of the Muslims.
Ibn ’Abbas (RAA) narrated, ‘The Messenger of Allah (Peace be Upon Him) 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. It is accepted as Zakah for the person who pays it before the Eid prayer and it is Sadaqah (i.e. voluntary charity) for the person who pays it after the Eid prayer.’ (Abu Dawud)