Having written a shell in C, shells require a lot of string and buffer manipulation, which I prefer doing in rust for both security and ergonomic reasons.
Shells are combination development environments, programming languages with primitives and standard libraries, and UIs, and as such need to be exactly as security-minded as any other standard library, IDE, or file explorer.