It may have slowed down the occasional attacker who had no access to a HP-PA RISC cross compiler for his platform. But in todays world there is no reason.
Well back in the 90s we kept the machines lean more because disk space was fucking expensive.
I'm not saying that minimal builds are silly, just that the idea of keeping compilers off systems as a security feature is.
Did they have /bin/sh or /bin/bash or /bin/csh?
Yes but they were only available to one user and that could only log in via the console server.
Joy to ACLs, custom Solaris builds and proper kit (ultra enterprise units the size of a full 42u rack).
I miss those days.
This is what systems administrators with grey beards thought in the 1990s. A moment's thought about what an attacker who can run a compiler can do instead of running a compiler should be enough to inform you about how silly the idea is in practice.