It only takes 1 person in a company of a hundred to completely destroy it. Allow one psychopath into your company and it'll go bankrupt or otherwise defunct within just a couple years.
These folks are afraid. They know their performance is substandard. They exist by hiding that low quality work from management.
When someone like you goes in there and makes a 3 hour report a real time dashboard, you can be sure management heard all manner of reasons why it took so long and that's just how things are and their expectations are unreasonable if they want it faster, they can try to hire someone, but there's no one who can do it better.
Until you. And then it's better and now their lives are worse, so you pay for it. You have to be gotten rid of because you are proof they their work isn't up to snuff. You came in and landed right on top of the hill. You were the king, so they had to knock you off.
Welcome to the war on competence.