Lifetime warranty usually only applies to the original owner. Given Trek's reputation, if you ride the bike for 20 yrs and then a weld or tube fails I would imagine they would happily warranty it with a newer equivalent frame. True frame failures are very rare, and mostly some up early since there was a manufacturing defect.
With many lifetime warranties, the manufacturer is basically betting that you'll re-sell it before it actually fails. See the Dodge pick-up above. The average truck buyer probably won't keep it much past the original warranty expiring. If it does need the power train repaired, they would likely have gotten 7+ years of service from the dealer.