Why does brew cleanup work so well?
I believe it works well since there is a system to version and track every single install and the script can do math to determine the space that it frees up. This is clearly needed if the versions get bumped several times a month and you have dozens of packages installed that get updated regularly. Basically, you're keeping multiple copies of the entire program and everything needed to link to / run / compile the package in many cases.


  Why it uses that space is also up to what packages you install and how often they change and what percentage of changes you download / cache / install.


It's an elegant solution so that you can cache the download for machines that have network constraints and when you uninstall the binary or libraries - the cached download remains until you call the brew cleanup only when they need space back urgently - others that have fast network and need space can clean up after every single install if they choose.