Lets say I set the padding between windows to 20px.
It is not actually 20px, but 2 x 20px, because it sets the padding from BOTH windows to 20px. This will result in double the gap. 

To have the same gap around the screen edge and between the windows at 20px (or any value), you have to double the value. So thats why it is 2 x padding and 4 x padding.