They are simply examples which I used for testing. For instance, when setting all margins to 0, with a "real" PDF, it is hard to determine whether the display is really "full screen", because you don't know how much white margin is INSIDE the document. This is why the samples have a black border: you can immediately check if the black border really reaches the left/right edges of the device. Finally, I produced multiple versions (A4 and letter), to see how it behaves with different page formats. And even more finally, the square in the center was used to verify that the aspect ratio is correctly kept.
In other words: they are not needed, and they are not magic in any way. They simply allow to visually verify the actual margins that are applied AROUND the document.