In the Torah, charity is a private matter. Each person has an obligation to help the poor in various ways, for example, by leaving some wheat on the ground, leaving some fruits on the trees, giving interest-free loans, etc. However, there is no public system of helping the poor.
In contrast, in the Talmud there is are public institutes called "Tamchui" (food for the needy) and "Kupat Tzedaka" (money for the needy), to which every town member is obligated to contribute a certain part of his/her income.
Since the "Tamchui" and "Kupa" were not mentioned in the Torah, they were probably enacted in a later date. So my question is: when exactly did they start? Who started them? And for what reason?