What is the necessity of "Code Sample" button in the "Markdown Editor" of this site?
Even if the term "Code Sample" is not exactly "right" for this domain (English Language and Usage), it allows for the
<pre>tag defines preformatted text.
Text in a pre element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks.
It can be useful, for instance, when you are quoting poems which may use special indentations, using several spaces. In the simple HTML this editor allows, "several spaces" are not easily done.
Except in preformatted text.
It can be used when showing an example of a markup. Like this:
It was a dark and stormy knight
(1). All the beagles were asleeep
(1) = "night", not "knight" (2) = "asleep", not "asleeep"
This should probably be community wiki if others have other uses in mind as well.