I have installed 100s of SFP connections and I've never had an issue with compatibility. I've never even heard of this. Is it just for some ultra high end products or something?
It's more for enterprise gear than anything. For example, enterprise Cisco gear will absolutely reject non-cisco optics, but datacenter gear won't. As an example, the Nexus 9000 line accepts non-cisco optics by default. Granted, those are 10k+ boxes so somewhat high-end but nowhere near the ASR line.
The nexus line being more modern in spirit also helps. Catalysts still reject non-cisco optics without a configuration line afaik.
A good rule of thumb is whether the equipment tries to vendor-lock you in.
Another example that comes to mind is at least one generation of Intel NICs (don't remember if it's the 5xx or the 7xx), where even the open-source mainline (!) driver will reject the optic without a driver argument passed to it when modprobe'ing it.
It's more common the more expensive the SFP host equipment, yes. This "compatibility" stuff is generally euphemism for "ridiculously primitive DRM" - lots of higher end network equipment checks the SFP Vendor ID and Serial Number and will reject it if it doesn't match an allow-list of "qualified" hardware. Programmers like these let you clone the VID/Serial from a "qualified" SFP onto a random SFP.
The two X520s that I have will refuse to work with non-Intel transceivers unless either you're running Linux and have set the 'allow_unsupported_sfp' option, or have edited the card's EEPROM to unset the "shut down unless the transceiver is a Genuine Intel part" bit. It's my understanding that very many Intel NICs are like this.
I remember [0] the Juniper switches that I used to have (before I switched to Mikrotik) refusing to work with anything other than Official Juniper transceivers.
That might be a misremember - I've been using Juniper for nearly 20 years now and only ever saw a "software bug" in 18.x that broke OEM optics, but that was quickly addressed with a patch shortly after release.