Do you really think someone would write a lexer, a parser, and an implementation of the LSP protocol for Bash in Bash?
Also, lots of Linux distributions don't come with GCC and Clang by default (Ubuntu, Debian, OpenSUSE).
Python is also the 2nd most popular scripting language in the Linux world; it's even part of the Freedesktop base runtime. Though I don't know if it's standard in BSDs.
Most distros don't preinstall C compilers.