The barcode on the baggage tag consists of a 10 digit number, of which 9 are used to identify the bag.
The first 3 of these 9 digits will usually be the specific code allocated to the airline by IATA. In most cases this will be the same as the 3 digit codes used at the start of ticket numbers (eg, 016 for United Airlines, 001 for American Airlines, etc).
The remaining 6 digits are assigned by the airline and are a "serial number" for that bag. The airline can assign these in any way they want, but for simplicity you could presume they are allocated sequentially.
This means that for any one airline there are only 1 million unique baggage tag numbers that could be generated.
To pick a single airline as an example, United Airlines flies around 150 million passengers per year. If we presume that each one of them checks on average 1 bag, that means they carry around 150 million bags per year. The number will actually be a little lower as the 150 million number includes connecting flights - so lets call it a nice round 100 million bags/year.
With only 1 million unique identifiers for 100 million bags, that means they will need to re-use the numbers roughly every 365x(1/100) =~ 3.5 days.
Thus once the number gets to a few days old, there is a non-zero chance that it will be re-issued. For smaller airlines this might not occur for weeks or months, but for larger airlines it could occur within days.
The airline themselves will almost certainly maintain a longer history of these tags for use in tracing (for example) lost or delayed bags.
This is very similar to 'confirmation number' used by airlines. These are 5 or 6 digit "numbers" and thus have a limited range of values (there are often rules around which letters/digits can be used in which positions, so it's difficult to calculate an exact range - it's higher than baggage tags, but far from infinite). As a result these codes are re-used, and thus they are only valid for the length of your booking and for a very short period of time afterwards (often measured in days or at most weeks, depending on the airline)