Doesn't one increase a system's attack surface area/privilege escalation risk by pre-installing tools such as these?
The times I've been locked in an ill-equipped container image that was stripped bare by some "security" crapware and/or guidelines and that made debugging a problem MUCH harder than it should have been vastly outnumber the times where I've had to deal with a security incident because someone had coreutils (or w/e) "unnecessarily" installed. (The latter tally is at zero, for the record.)
(This is a genuine question). In what circumstances would you need to install/run dev tools in prod?
Of course having a compiler installed isn't necessarily an issue... but it might well be a sign that there is an underlying problem!
(FWIW, I used to build everything from source. Yes, also in prod. That was a while ago...)