What you are seeing there is syntax highlighting. 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. In this case, the question has the 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.
<!-- language: -->.