It's what Sumyjkl said. Margins have purpose only within the editor. Supposedly, you use the margin space to "park" all of your game objects (sprites, text, etc) if you wish so.
An example will be to have an explosion sprite outside the layout (within the margin space) and call it at runtime with actions.
Of course, you could use a separate layout to store all of your game assets and keep each level layout clean.
However, having a large margin number also allows for greater zoom out on the editor, and for me that's the most useful thing about them.
-EDIT- I've noticed that you are mentioning shaking at the title of this topic. If you actually ask about the shake action of the scroll to behavior, then the layout size/window size does have an affect: in order for the "camera" (the window) to shake, the layout size must be bigger that the window size.