This is a plastic replacement housing for a magnet used to hold a door closed.

These housings get brittle, and break. This is a way to replace the housing inexpensively especially if you have a bunch to replace!