There's absolutely 0 advantage, especially when AI can write simple code like that easily, over using any other language. It makes reading and maintaining much more complex.
Hell, even GitHub's syntax highlighting (and VS Code's) breaks in many places throughout the script. It's just a terrible developer experience, even for your own scripts that nobody else will ever touch.
Some people will say that the advantage is that you don't need to install another runtime, but even this is wrong as the script uses bash, not sh.
I hate Python with a passion, but I'd gladly take it over bash for any of those scripts.