This is how corporate life works & it took five years for me to come to terms with it. However, I have done much better as an Employee (in the eyes of my Manager/Company) ever since.
Once you develop a good reputation by playing the game, you can always fix old bad decisions & at that point, your superiors would actually encourage you to do so.
That doesn't mean it's always the wrong decision, though. Sometimes, technical debt is the right trade-off. Sometimes the trade-off of teaching your boss just isn't worth the effort, and getting the job done quickly works out.
And, just like technical debt, doing this results is more problems for other people (including future-you) as your bad boss looks good and calcifies his bad habits and rises in the ranks.
Personally, my preferred solution is malicious compliance. If someone makes a stupid decision, they have them suffer the consequences of that stupidity rather than covering for them and letting them delude themselves that their bad decision was good. This only works on new decisions, though; if you try to remove existing work-arounds for old bad decisions, you're the one that looks bad.