Your sample code can be rendered on the page instantly, so the people who read your document can see the preview immediately. If he/she expands the demo box, the source code and description are shown ...