Bloom was originally developed against catkin based packages. However it has templates for 4 different build types: catkin, ament_cmake, ament_python, cmake (this is just plain cmake) It is the release tool used for both ROS 1 and ROS 2 debian and rpm packages.
In the underlying packages we have 7 different dependency types that are designed to capture the different nuances required for the differentiation of runtime, build time, and build tool needs for cross compilation, as well as test and documentation dependencies.
These dependency declarations can be leveraged for to optimize for certain build targets. As highlighted by Rob you can make use of those actively to build optimized runtime only targets with the OpenEmbedded builds.
The debian pipline already splits out the build, runtime dependencies. And of course there are more optimizations possible such as the one Jochen has proposed. This level of complication is not in our default tutorials or workflows as the additional complications further increases the learning curve and is not adding value for most of the development use cases. The value comes in when you start looking at deployments and you’ll find people doing everything from the aforementioned OpenEmbedded, to Conda/Pixi/RoboStack to Nix to Snaps
Here’s some links to resources to get you started learning about the many different ways to potentially deploy ROS besides the main debian packages and source builds which are focused on the developer experience.