If this "control box" was meant to be examined while energized, the requirement for workspace would be in effect. Layin 2x4 grid can't give you this space, as it's only 24" wide. In any event, the reason for the shock was the inspector's failure to follow proper safety procedures, ignoring the warning label even though "HAZARDOUS VOLTAGE" is written on it and there's a pic of a guy with lightning bolt through him.