I always notice when posts come up about roof shingles and bad installation practices, that warranties will be voided. Here is some good info to know for warranties to be valid.
Unless you have the actual documentation and/ or proof of a permit install, you have no proof of how old the roof is.
If you are buying a home with a roof that is under warranty, you must send the shingle manufacturer information requesting warranty transfer, with proof of deed showing you as the new owner. The warranty is only transferable once.
For the warranty to be valid, it must be installed according to the specific manufacturers instructions AND local AHJ requirements.
So next time you see a bad roof, chances of it still being under warranty are slim to none.