Organised charity is one of the largest things religions do, and it long predates the state doing it.
The waqf, an endowment of property whose income supports a stated purpose in perpetuity, financed much of the public infrastructure of the Islamic world: hospitals, colleges, fountains, soup kitchens, road stations. Because a waqf was legally inalienable it also served to protect family assets from confiscation and division, which is one reason so many were created and a reminder that pious institutions have mixed motives. Colonial administrations and later national governments took control of waqf property across much of the Muslim world, and the institutions it had funded suffered accordingly.
Christian monasteries, guilds and confraternities ran hospitals, almshouses and hospices across medieval Europe; the word hospital carries the origin in it. The dissolution of the English monasteries in the 1530s removed that system, and the state took over the relief of poverty by statute within a generation. It is a rare case where the handover from religious to public provision is directly visible in the record.
Sikh practice built the principle into the architecture. The langar of a gurdwara serves a free meal to anyone who comes, seated together on the floor regardless of caste, religion or wealth, and the seating is the argument: it was a deliberate attack on ritual hierarchy and not merely a way of feeding people. The kitchen at Amritsar serves on a scale of tens of thousands a day and has done so for centuries.
The modern position is that faith-based organisations remain among the largest non-state providers of relief in the world, which raises the question every such body now faces: whether aid is conditional. Most major religious relief agencies publish commitments not to proselytise while distributing. Those commitments exist because the practice was once otherwise.