There are specific version profiles like "opengl 3.3 core profile" but a lot of older apps aren't versioned in any fashion, they just request specific extensions. Behavior for specific extensions has varied (old drivers had major bugs, and apps had workarounds for them). If you're on mobile you can assume with near-100% reliability that your GLES driver has a bunch of bugs and you'll need to ship workarounds for them. Chrome (Blink) and Firefox (Gecko) both have huge blacklists for specific GPUs/drivers along with sets of workarounds for issues, many of them specific to individual mobile GPU chipsets or drivers. I shipped a game targeting GL 3.3 core a couple years ago and we hit multiple driver-specific bugs, despite 3.3 being pretty old.
Now imagine you're a driver developer: All this software out there assumes your driver is broken. What happens when you fix it? Well, hopefully the app's workarounds don't actually cause it to break or produce incorrect results. What if the workarounds make it really slow? You want it to run fast on your hardware so people won't buy your competitor's hardware. So now you have workarounds for their workarounds...
OpenGL shaders have (iirc) always been versioned, so that's good at least. The introduction of profile versions also helps but at present even those tend to have major bugs depending on OS and driver, so workarounds still end up in games and applications.
Direct3D was historically much more explicit about versioning and feature sets but there's a lot of variability through things like caps flags (hardware can advertise different levels of functionality) and the app explicitly requesting specific features like a given texture format. Shaders in Direct3D are versioned, but it's quite possible that a driver is only built to handle shaders generated by a given shader compiler, so a new compiler targeting the same shader version will still break the driver. Some shaders probably were generated by old broken compilers, and the driver probably has workarounds for those.
Also, modern graphics drivers typically have a bunch of hacks they quietly apply to big-name game titles and applications to make them run faster or suppress crashes. This goes as far as driver developers actually rewriting the shaders that a game uses, in order to improve performance on their hardware. An infamous old example of this is 'quack3'. https://techreport.com/review/3089/how-ati-drivers-optimize-...
On the bright side, a lot of this madness is gone in Vulkan and Direct3D 12. But very little software is going to end up using those APIs because they're much, much harder to use correctly.