Long answer: Not OP, but sometimes you’re in a throwaway env and want to quickly do a DNS query and don’t have any tools (like Ubuntu minimal) available. Spawning an ephemeral container isn’t a bad idea in that case.
That's also where declarative package managers such as Nix and Guix shine. You can temporarily "install" packages that can be cleaned up later, garbage-collection style. Besides being their own distros, both can be used as add-on package managers on other Linux distros, for example.