What you're seeing here is vim-markdown's support for highlighting embedded languages in fenced code blocks.
In short, vim-markdown will recognize the
```python and it will use Python syntax highlighting for that code block.
You can find the code that implements that here.
It will create a new syntax highlighting group
mkdSnippetPYTHON and have that block include Python syntax rules.
In theory, you could change the background of that specific group:
highlight mkdSnippetPYTHON ctermbg=yellow
But I found that doesn't really work great, since Python keywords (such as
def, etc.) and other highlighted terms (such as function names in a function definition) will have been styled by Python and will override your background setting, showing a normal background.
Note that this doesn't happen if you don't have a language in your fenced block, if you start it with only
``` or if you have it for a language that's invalid or not recognized. (If you really wanted to keep the
python language tag but not use syntax highlighting here, perhaps mapping
'python' to an invalid value in
g:vim_markdown_fenced_languages would be a somewhat hacky way to disable this behavior.)