An accident happens quickly, but museum staff know very well what they are doing. After the exhibition, all materials that you cannot keep and may spoil have to be disposed of again.
In the case of Artur Barrio's artwork, with coffee grounds and breads, you cannot keep. These go into the trash after the exhibition and new loaves of bread and coffee are bought at the next display. Or think of Ann Veronica Janssens' work with blue glitter, which is always strewn out again at a new exhibition.