I've seen this phenomenon play out multiple times in my professional career, where a considerable amount of effort goes into creating a robust system only for the effort to be minimized by management due to its stability. Somehow preventing a plane from crashing is not as valuable as digging through the ashes.
In agreement with your overall point, accounting and legal is different though.
For accounting, it's not a simple cost center, and is at the front line to show the numbers. They can say how much it will cost to not comply with a rule, or how much they saved by creativity or ingenuity. Being that close to the money is a tremendous advantage.
Legal is more distant, but there's a clear scale of how much is on the line. When you review a contract, it's pretty clear what’s at stake if legal work is botched.
That's my main takeaway: if you care about money, you need to be as close to it as possible. At the same skill level, dealing with user security or financial transaction security won't pay the same.
That's why presentation and "sales" type skills can be useful. A bit of doom-mongering internal PR about the problem, then present the solution. Don't just solve it quietly.