What you are seeing there is [syntax highlighting][1]. This can be formatted explicitly in a post, for example, you can turn on Bash syntax highlighting for a code snippet by adding a tag before it:

    <!-- language: lang-bash -->

Syntax highlighting is also [applied automatically according to a post's tags][2]. In this case, the question has the tag [tag:python3], so all code in the question and all of its answers will be displayed with Python 3 syntax highlighting.

This is often not what you want... for example the question relates to Python but is mainly about package management and contains a code-formatted block of APT output. You can turn off syntax highlighting with a tag like this:

    <!-- language: lang-none -->
or to turn off all syntax highlighting in a post

    <!-- language-all: lang-none -->

For more information see [What is syntax highlighting and how does it work? | MSE][3].

[1]: https://askubuntu.com/editing-help#syntax-highlighting
[2]: https://meta.stackexchange.com/questions/72082/changes-to-syntax-highlighting
[3]: https://meta.stackexchange.com/questions/184108/what-is-syntax-highlighting-and-how-does-it-work