Usually in mine design you leave a solid rock pillar of &gt;20m or so between your mine access and your ore drives and stopes where you extract the mineralised rock. The actual distance depends upon the size of void you are creating from removing the ore.

This is done to prevent exactly what happened on Chile.

Developing countries often do not have the same safety standards as more western and even former Soviet era countries. Even if they do, they often don't follow them, as inspectors can be ignored, paid off, are too few, or lack technical experience.

So yes, they were too greedy and this is probably the company in the Chilean case. They fucked up the ground by removing ore that was designed to be left to protect them. Their access decline was put in too close to the ore and as they kept removing it they lost the natural ground support of the rock pillars left behind.