More specifically, it is because of the negative margin.
Using a negative top/bottom margin can be seen as pulling as opposed to a positive, which is pushing. But, you are right to be curious about why the margin div seems to be breaking into the box, that would otherwise, be a barrier, at least when talking about two statically positioned blocks. Using negative margin, is in fact, an alternative to relative/absolute positioning, well in some cases at least.
The assignment two assignments from the one you are on talks a bit about negative margin, unfortunately IMO it does a pretty bad job of it saying.
“If you set an element’s margin to a negative value, the element will grow larger.”
This is only true of the left/right negative margin, not top/bottom. It also doesn’t actually talk much (at all) about how or why to use negative margins.