That dust cap did not "snap off". It was CUT because the doofus that installed the cotter-pin didn't have enough sense to cut the long leg down, or bend it out of the way.
The guy who worked on that wheel bearing is an idiot, and owes you a do-over, including re-packing the bearings again because of the potential grease contamination from driving around with the cap cut open.
The guy who worked on that wheel bearing is an idiot, and owes you a do-over, including re-packing the bearings again because of the potential grease contamination from driving around with the cap cut open.