What is common in the automotive repair industry, and is the law where I live is that repair shops must return your old parts. This could be requested when getting your bike worked on.
As far as swapping parts w/o owners knowledge, could happen but probably not in most of the developed world as the labor mostly outweighs the value of the used part.