I have been in two software product houses for three years in a row.
The first is a small company maintaining a fairly small management system with a monolithic legacy code base (almost twenty years). Tightly coupled code is everywhere without sufficient unit test coverage. However, the management usually does not want developers to refactor the legacy code.
The second is a fairly big company maintaining a big domain-specific system with a huge monolithic Java legacy code base (over ten years). The layered architecture indeed decoupled the infrastructure from the business logic. However, in their business layer, there are also some giant classes with more than 3 thousand lines of code. Developers still continuously inject more and more code into those legacy classes. Developers are allowed to refactor their own fairly new code about adding new features, but are warned not to refactor these giant spaghetti classes, either. Experienced senior developers say that changes or refactoring on those classes might be disastrous due to the lack of regression tests.
However, personally I have read practical books about clean code and refactoring. Most of the books strongly recommend developers to refactor actively. But why in real world companies are against this?
So I would like to collect answers from very experienced developers. Why do these two companies I was in prefer to keep the super legacy code unrefactored? Isn't this disastrous?

Most of the books strongly recommend developers to refactor actively. But why in real world companies are against this?-- You already know the answer to this. The code isn't covered by unit tests, and it's too brittle to refactor without unit tests to cover it, so instead of doing it the right way and spending the money to write unit tests and refactor, the companies simply say "Do not touch it." It's not necessarily a bad strategy; if the code works, and it's never touched again, then it's never going to break, is it? (fingers crossed). – Robert Harvey Sep 25 '20 at 21:45Do not touch it. It's not necessarily a bad strategyI know what I'm gonna say might sound controversial but. Aren't we professionals? Any decaying code is all about professionalism. A lack of it. Even if my company/customer doesn't care, I have to insist in how pernicious is the Tech Debt. For all of us, including the company. Somehow, I came to the conclusion that no, it's not correct because if we are not part of the solution, we are part of the problem. It's, to me, a mater of self-esteem. I mean, If I don't give value to my job, I can not expect others to do so. – Laiv Oct 23 '20 at 11:00you should insist on solving technical debt as a part of the development life cycle and as part of your daily routine. The same way you write the test without anybody asking you for it, you contribute with code quality improvementsfor my this is rather simple to do because I work for a consultancy, so I do estimations including this and if they dislike my estimations, my answer is always the same "then ask for it to someone else because I don't know how to make it faster, cheaper and reliable". – Laiv Oct 23 '20 at 11:22publickeyword, and they intend to add some logics into data objects, which should not contain any business logic. They like to make a fat REST API controller by including lots of business logics inside here and there. These all make me doubt on their professional skills. But manager have no understanding on the tech and trust the seniors as their code work even though it is difficult to maintain. I intended to learn from the senior developers, but it seems on the opposite. I am actually a bit sad on this. – Rui Oct 23 '20 at 14:54esp. senior developers usu say "I will not change your code" for others' respect, and managers even think refactor is an execuse for delaying the work. So I eventually decided to leave- HAH! I've heard that. It's not about respect, man! That's about experience, fear, laziness, and code quality. When someone says that they won't touch your code, it's almost never about respect. They know that if they change something they don't fully understand, they may make subtle mistakes, and if they leave doing the change to the author, the risk of mistake will be smaller. It's just that. – quetzalcoatl Oct 28 '20 at 09:35Three thousand lines of code. I'm currently sat at a file with 7800 lines, which I am adding to! D: Although the main creator of the file does appreciate my code refactorings, it doesn't hurt to ask if you can split classes across different files, which most languages will let you do. – Connor Blakey Oct 28 '20 at 10:31