How do I understand the reasoning behind the code?
You follow the code sheet, but you are working from the letter, not the logic, and that is why things slip past you. A rule you do not understand is a rule you can only half-apply. Almost every line on that sheet is there because something once failed and someone got hurt or something got costly. When you know the reason behind a requirement, you stop just matching the sheet and start seeing what it is protecting. That is what lets you catch the situation the sheet did not quite cover, because you understand the danger it was written to prevent. Take one rule you follow without knowing why. Ask an inspector or an old hand what it is really guarding against. Do that with one rule at a time. Piece by piece, the code sheet stops being a checklist and becomes something you actually understand.