CSS position is a tricky one to explain.
When an elements position is absolute it has to have a parent element to which it is positioned relative too.
In the GP menus a sub menu ( li > ul ) is absolutely positioned, relative to the parent menu item ( li ).
In the mega menu CSS the first two rules change that relationship. Making the inside-navigation the nearest relative parent for the mega-menu > ul. So when left: 0; and width: 100%; is applied to the mega-menu > ul it takes up the same spacing as the inside-navigation.
The CSS I provided above makes the inside-header the nearest relative positioned parent allowing the mega-menu > ul to take up its spacing.
Hope that makes some sense lol