I've worked inside #2 nacelle wheel well on Collings' B24 right near where the wing spar passes through. The (single) spar is a sheet metal web with heavy cap strips top and bottom. A structure like that is lightweight and relatively strong against bending straight up and down, but depends for torsion resistance on its web and the stiffening effect of the D tube formed by the spar, the leading edge ribs, and the heavy leading edge skin. It's a lightweight, stiff structure formed almost entirely out of sheet metal. Now explode a 90MM fragmentation shell inside that D tube near the wing root where the stress is greatest and you've just excavated most of the sheet metal, and what do you think is going to happen?
Now anyone who has seen photos of B17 production lines knows the 'Fort has a main and a secondary wing spar, that both of them are constructed of a trusswork of U-shaped, thick, aluminum segments riveted to heavy L-bracket capstrips riveted back to back to form a "T". Also the two spars are stiffened against tortion by robust diagonal struts running between them. A fragmentation shell could explode in there without tearing things up so much.
The science of all metal monocoque cantilever monoplane construction was in its infancy when the 'Fort and the Dakota were designed, the B17 was the B52 of its time, and it and the 'Three were over-built just to be on the safe side. I know which bomber I'd rather take in harm's way.