It’s all torques, moments, levers or whatever you want to call it.
Make a triangle out of bits of steel and keep it all within the sills, transmission tunnel etc and you’ll need a lot of steel to make it stiff.
Make it a big bigger and purpose design it to take all the loads and it can be much lighter (think TR etc, the chassis is a big influence on the layout inside.
Now make the triangles huge and part of the roof structure, it can be hugely light, think frerrari/lambo/noblel etc, they can be phenomenaly light and phenomenaly stiff. The ‘hypercars’ (FXX, MC12 etc) are very rarely open top for this reason.