.....
The amazing thing is he let me keep my job.
I suspect these two facts are connected. Having enough sense to realise when you are (if you'll forgive the expression in the circumstances) out of your depth makes a lot of difference to someone's potential. I could forgive most things, myself, from a subordinate who realised when it was time to ask for help. I had little patience for those who tried to bluff their way through it.
I agree with you. It’s counter-intuitive, but recognizing that you’re in over your head and deciding to tell your superior about it takes initiative.