The benefit of writing semantic HTML stems from the goal of a web page—to communicate. By adding semantic tags to your document, you provide additional information about the document, which aids in communication.
Semantic HTML tags provide information about the contents of those tags that goes beyond just how they look on a page. Text that is enclosed in the <code> tag is immediately recognized by the browser as some type of coding language. It is entirely possible that some user agent could create an entire code library just by reading a website's <code> snippets.
In a less futuristic scenario, using semantic tags gives you many more hooks for styling your content. Perhaps today you prefer to have your code samples display in the default browser style, but tomorrow, you want to call them out with a gray background color, and later you want to define the precise mono-spaced font family or font stack to use for your samples.
If you have all your code samples defined with the semantic <code> tag, this is easy to do.