When answering this question, code references are great (IIRC) if there are any applicable, but I am asking specific to northern midwestern climates in the United States (up near Canada) and best engineering principles since the code likely doesn't get so specific.
Background: Clay surrounds my foundation. We have heavy spring rains that saturate the ground and well-below freezing winter temperatures. I recently had a basement egress window installed where there was previously just a small glass block window. I was expecting the installers to fasten the window well to the house and use caulking around the edges to prevent water from seeping into the well, but there is a noticeable gap between the well and the house/foundation all the way down to the bottom when viewed from the inside. The installers did not add any drains from the bottom of the well to the storm sewers because they saw that I just had a sump pump system installed on the interior of my home. My concern is that if the water table rises high enough with spring rains that water may start to pool in the well and come in through the seams around the window.
The installers said that they intentionally did not fasten the well to the wall because of the differences in expansion and contraction of the metal well with respect to the cinder block foundation--over time, it would cause the fasteners to pop out of the cinderblock. In which case, the well would potentially damage the cinderblock and still be detached from the house (leaving room for the same problems as not attaching it in the first place).