Python is good for general-purpose scripting, which does cover most of the tasks, but it’s still too bureaucratic when it comes to OS primitives. And when a small script at hand is tightly related to some OS thing anyway, it’s not a disservice to write it in shell.