margin isn't visible but neither is padding unless you have a background or border

The box model doesn't relate to what's visible, it's simply used to calculate the total width of the box. 500px plus a margin of 10px on either side of a box will make that box 520px in exactly the same way as if it were padding applied so what's visible is irrelevant.