this helps us to avoid installing unneeded packages and removes the package cache from the images to keep them less bloated.
We're using this in an internal network for jenkins integration testing, so no security concern.