That's right, what really happens is that the cell needs a "trash can", just like we do, because sometimes, things can go wrong along the process.
The processes that the lysosomes can be involved are quite a lot, but the main one is the protein making. Why? Well, it's simple, there's a chance of mistake in each part of a protein our cells make through all the process, and when this happens, the cell recognizes it before this protein goes outside the cell, after this recognition, some flags are put in it to mark it.
This mark will work in a way that the protein will go into the lysosome, and in a lysosome, there are several kinds of enzymes, so this protein can be degrated into little components again, the amino acids, and these can be used again in the process of making a new one. This is the process of recycling the protein, whether it's a misfolded protein or even the ones that the body won't need it for now.