The oldest monastic rule about robes is that a monk should not own one. What he should have is cloth nobody else wants: rags from a rubbish heap, and, explicitly, shrouds from a charnel ground, washed, dyed and stitched together. Pamsukula means cloth from the dust heap, and it names both that class of material and the practice of taking it.
Almost no Theravada monk has obtained a robe that way for a very long time. Robes are given by lay donors, and giving them is one of the standard forms of merit-making. But the older practice was never dropped; it was folded into the funeral, where it does something that ordinary donation cannot.
At a Sri Lankan funeral the monks are invited, and at the appointed point in the proceedings lengths of white cloth are offered to them. The offering is framed as cloth from the dead: laid over the coffin, or presented in the dead person's name, so that what the monks receive is understood to come from the corpse rather than from the family's wardrobe. The monks then chant the formula about the impermanent nature of compounded things and accept the cloth.
The effect is precise. A gift to the sangha generates merit. Making the gift come from the dead person puts the dead person in the position of donor, so the merit accrues where it is needed most and can be assigned onward, and a rule about poverty from the earliest layer of the tradition is doing pastoral work two and a half thousand years later.