CCC 1351 From the very beginning Christians have brought, along with the bread and wine for the Eucharist, gifts to share with those in need. This custom of the collection, ever appropriate, is inspired by the example of Christ who became poor to make us rich:1
Those who are well off, and who are also willing, give as each chooses. What is gathered is given to him who presides to assist orphans and widows, those whom illness or any other cause has deprived of resources, prisoners, immigrants and, in a word, all who are in need.2

1
2 St. Justin, Apol. 1, 67: PG 6, 429.