The passenger stub is typically handed to the passenger or attached to the ticket envelope:
a) to aid the passenger in identifying their bag among similar bags at the destination baggage carousel;
b) as proof—still requested at a few airports—that the passenger is not removing someone else's bag from the baggage reclaim hall; and
c) as a means for the passenger and carrier to identify and trace a specific bag that has gone astray and was not delivered at the destination. The carriers' liability is restricted to published tariffs and international agreements.
The first "separable coupon ticket" was patented by John Michael Lyons of Moncton, New Brunswick on June 5, 1882. The ticket showed the issuing station, the destination, and a consecutive number for reference. The lower half of the ticket was given to the passenger, while the upper half, with a hole at the top, was inserted into a brass sleeve and then attached to the baggage by a strap.
At some point, reinforced paper tags were introduced. These are designed not to detach as easily as older tags during transport.
Current bag tags include a bar code using the Interleaved 2 of 5 symbology. These bag tags are printed using a thermal or barcode printer on an adhesive thermal paper stock. This printed strip is then attached to the luggage at check-in, allowing automated sorting of the bags by bar code readers.
There are two ways that bar code baggage tags are read: hand held scanners, and in-line arrays. In-line arrays are built into the baggage conveyor system and use a 360-degree array of lasers to read the bar code tags from multiple angles because baggage and the orientation of the bar code tag can shift as the bag travels through the conveyor belt system.
According to wikipedia