Many bikes are crashed out of commission or die from neglect before their engines wear out. Also there’s the question of how it’s ridden – w/ tender loving care or red-lined upon start. Depends on make and model, a well maintained and regularly ridden bikes can go for 30k/50k/100k miles and beyond.
People have posted check-list for buying used bikes here and there on the web. Also, if you don’t know what to look for, it’s recommended to have a mechanic check out the bike before purchase. (I didn’t, and I got lucky w/ my bikes.)
You can check Wikipedia for GS500 model history and year-to-year differences.