The ironic/tragic thing is that the consultants who are brought in at much expense (and who therefore have some credibility with "the business") are often no better than--usually worse than--the in-house engineers they are supposed to help. If you ever find yourself an engineer in a dynamic like this, you should interpret it as a sign of mistrust--even outright disrespect--of you and your peers by your bosses. Imagine if you were a physician and hospital management thought it necessary to bring in outside physicians to help you with your patients. Not many doctors I know would put up with that, but engineers are culturally so submissive that they go along with it and deal with the Dilbert scenario of the $500/hour consultant giving the same recommendations the in-house engineers have been saying all along (which the consultants get credit for, of course).
If you're ever in a position of authority and feel that it's necessary to bring in consultants to "fix" your codebase, it would be worthwhile to reflect for a few moments on how this situation came to be. Either you failed your organization on the hiring front and have terrible engineers (unlikely), or your otherwise talented engineers cannot do their jobs effectively due to the environment you've created. Perhaps you've forced them to incur so much technical debt by nonstop "sprints", unrealistic deadlines and multiple pivots that any forward progress is all but impossible. Consultants probably won't fix this.