In the case of the WTC, the outside of the building was the main support structure. Holding up those panes of glass were steel beams. It was like an exoskeleton. Once the planes ripped gaping holes in that exoskeleton and then smashed and melted many of the interior columns, anything could happen.
Many, if not most, buildings will suffer severe structural damage from the loss of even one major support pillar. That the WTC did not collapse immediately from the loss of many consecutive supports is pretty remarkable.