Pentax is hugely backwards compatible. I have glass sitting around that is over 30 years old that works flawlessly on my modern SLR. The only problem is some of the newer lenses, made for crop sensors, aren't really usable on film bodies without severe vignetting (though not always, some labeled for ASP-C are actually have a 35mm image circle). Also, all however many years of class all have stabilization, thanks to in body IS (why is also why I picked Olympus for my mirrorless).
Back in the film days there were several companies making class for other big brands. Also most screw mount lenses were pretty universal (m39 for pretty much all rangefinder/Leica type cameras, and m42 for pretty much everything else. Bayonet mounts is where things went downhill for compatibility. Now the only real "open" platform out there is Micro 4/3s, but even that isn't terribly open since its only Olympus and Panasonic.
I wouldn't call it lock in, though, since there are actual physical limitations, such as flange distance, and contacts (what features do you want to ship to the lens, or keep in body?). Some of it is obviously lock in, but thats putting it a bit strong.