If the medium is defined by a voxel grid, this is trivial: just iterate over all the voxels and compute the maximum value.
But in production, volumes are often the combination of several voxel grids, with additional procedural modifications (e.g. fractal noise) all authored as a complex node graph. This means we cannot generally find the exact maximum density.