The UK has (had) a tax credit for "Research and Development", intended to be a tax break for genuine R&D, but of course everyone lumped all software development into.
The UK eventually put out guidance that business as usual development isn't really "research and development", but afaik there hasn't been a serious crackdown on the practice.
It seems kind of absurd to pretend that most work that developers do is pioneering the profession.
R&D tax breaks make sense, both to encourage genuine research but also to prevent brain-drain.
Not taxing (or tax credits / refunds ) for line-of-business software isn't really excusable.
It's bad that the law in the US has been changed in a cliff-edge way though.
I've dealt with this at a previous employer (where we did try to be reasonably honest and submitted things that had some R&D element, I can imagine a less principled approach). The concept of it seems sensible, in practice you end up justifying why something is R&D to essentially non-technical people, probably at some consultancy who can then repeat a moderately garbled version of your description to HMRC who presumably just approve in most cases because they also don't have the expertise to truly assess the subject matter (and let's face it, we'd all struggle, even if we believe we're expert software engineers, how do you assess whether work on a mortgage issuing product for a bank is truly R&D if you have no familiarity with the domain).
I've been questioned on whether systems I had a hand in would qualify for the R&D credits. Someone not particularly close to it had thought it might, but I explained to our external assessors that it didn't and they agreed with that.