Taking responsibility is one of those behaviors people claim to respect, but often practically don't.
It is not because they are being dishonest. That is because respecting it and not viewing it as a sign of incompetence requires a degree of cynicism and not taking the comparables (co-workers who do not admit errors) at face value.
(Story is anonymized, so it will read a bit weird)
There used to be this developer I worked with who during meetings, would often point out an error he had made in a prior task and how it should be added to the to-do list because it would cause X problem if not fixed.
Management and I (I joined in this error for months) both thought he was not very good as there was always something that needed a fix. People eventually got very annoyed with him for making so many errors.
Why? Nobody else had bugs attached to their names. Someone else found them, reported them, and it had often been long forgotten who did the original work when the bug was assigned for repair. You only knew who created the original bug if you looked at the IDE annotations when repairing it and nobody was keeping track of that. We just used it to know who to ask if we were fixing it and management never looked at that.
This developer didn't produce more bugs. He probably produced fewer, as he was constantly reviewing code in his head and went back to check if he did something correctly even if an item had cleared all the way to prod. But the perception was that he was constantly making mistakes which were slowing down the project and eating up development time. Everyone else had their bugs spotted by someone else and added to the board that way or they were never identified. I just tended to bundle any bug fixes I identified into existing tickets. All those bugs were just considered the cost of development.
And after a while he no longer worked there and not by choice.
Superficially looking at it, he was making a ton of errors compared to everyone else. He very clearly announced his errors. Others did not identify or withheld them. But the people responsible assumed that all the information was on the table and acted accordingly. And I have witnessed this error a couple of times, although this had the most significant result for the person involved.
A common area people make this error in life is examining the success record of a company's mutual funds. People will take a look at all the funds they have and see if they did well or not. Well, fund companies just eliminate funds that do badly. If you encountered a company that showed the past performance of all funds, you might conclude that they are bad at what they do. You likely would not invest, as it wouldn't occur to you that the other companies just eliminated the bad results.
So yes, on the surface it seems like it is a respected behavior and I bet many bosses do not know they are doing this. But the problem is that many people are not open and unless managers are willing to factor in that most hide their failings and do not display them openly, you seem incompetent relative to others.
People have a bias for what they can see and it is harder for them to consider something missing..
I have never worked for a boss who doesn't believe that they would respect it. Put to them, every single one of them would say "I want people to admit their mistakes so we can fix them." I know that I would want that. But my experience has certainly been more complicated than that and I know that in the most significant case where I actually encountered it, I got it wrong for months. And I arguably knew better than management that all developers produce bugs.
It is hard to advise as it depends on the company, but understand how things are perceived and act accordingly.
There are lots of things like this, where managers genuinely want one thing, but unknowingly punish it.
Excuses don't help you, but they might keep you from being fired
I haven't ever seen excuses do well. That is very visible and obvious, so that takes things too far. Sourav Ghosh has a good answer on this. What they might do is seed enough doubt that extreme action seems like it would be too far. Politicians do it across the political spectrum for a reason, that reason being that you will watch their speech, consider what they have added to be most of the information, and draw conclusions based on that.