Sometimes high $$$ is justified
Decades ago, on an IBM 360 Model 20 (or something like that), I wrote assembly code to figure out all the valid combinations of some industrial contraption being machined. Their original "system" broke down (bad code, dumb logic) and the original programmer gave up, could not figure out his own bad code.
I was approached to "fix it". It took me all of an hour to get the assembly code just right, and it was so small I could multipunch it on 3 punch cards (remember those 80 column babies??)
When I asked the manufacturer what if it cannot be fixed, he said he'd shut down. And if it can be fixed? He said he'd make a mint, he had a rich, juicy contract for the product. I asked for 3% of the mint. He thought he'd arrived in heaven!
In this case my hourly rate was huge, many-many times what the most expensive lawyer I heard of, really! But a business saved, 3 salepersons had jobs, 18 manufacturing and other workers in the business had a job, owner had a business that continued thriving and growing for at least a decade that I am aware of. Yeah, they got into many other things after they came back from the dead, well, the had money to do it...