A lot depends on the angle of the impact and where the impact is taken.
"Sag, mash, diamond and twist" is the old saying, most applicable to a straight-on impact to a frame rail.
You can get some idea of how unibodies distribute forces by messing with a small light cardboard box.
Or better, a rectangle composed of say welding rod with some thin tin tacked to it.
Basically, the "soft tissue" deforms, then the load is taken by reinforcing members.
Cowls are typically the strongest area, but if you hit a hinge pillar hard enough the rocker will tend to bow then buckle downward, and the roof upward.
The trick is to reverse the forces and "walk the damage out" so to speak, to get the hard points (mounting locations) back to square.
The you deal with the panel appearance, sometimes having to replace them for aesthetic reasons or trim mounting.
The bottom line is cost, and the ability to end up with correct dimensions and proper structural strength & fit/finish.
Easiest way to spot a poor repair is panel gaps, buckles, poor fit.
Post some photos of the door jamb, door closed & open.