In my experience of buying (or just salvaging) old secondhand stuff, most bikes don't take a lot of effort to make them at least safe and useable. A lot of bikes are "virtue purchases" made under the buyer's good intentions to lose weight and get fitter, but then subsequently don't get used much after the initial novelty has worn off. That means a lot of them just spend years stored in dark garages and sheds where they gather dust & cobwebs in addition to the filth that was already on them at the time of being mothballed, but they might not have done that many miles. They don't look too promising when you get hold of them, but a lubrication overhaul and putting some air in the tyres is often all that is needed, without replacing a single thing.
Bikes that have been used as commuting hacks and parked or stored in the open, and ones that get skipped after first cluttering someone's back yard for 10 years, tend to be the ones with rusty chains, seized cables, stuck seatposts., and ripped saddles. Often they tend to be of the very low budget/BSO category, and are sometimes better used as parts donors rather than spending money on sorting them out. You'll never make a decent bike out of a junk full-sus frame, so for me the type and condition of the frame plays a big part in me deciding whether to sort out a bike and ride it, or strip it for spares and skip the leftovers.