It depends. I've worked at a company where the compressed and gzipped JavaScript file was over 1MB because there were multiple libraries being included for the use of one function.
That's obviously an extreme example.
Ultimately it's the engineer's job to make good decisions.