To provide aeration to soil and help retain moisture. It should never be used as a standalone substrate unless the intention is just to keep microfauna like springtails. Furthermore, inactive carbon is better equipped for use in systems it can be fully submerged within water.
Horticultural charcoal can be beneficial in a number of vivariums. It is best used as a soil additive within the drainage layer to increase surface space for microbes to accumulate on. This kind of charcoal is usually used in terrariums and other types of dryer biotypes but is also used by experienced hobbyists in aquatic setups as well. Here is a recommended list of vivarium types active carbon is commonly used in:
Paludariums – Half aquatic/ half terrain-based enclosure.
Ripariums – Mostly aquatic-based enclosure with some terrain features present.
Terrariums – Fully terrain-based enclosure with little to no aquatic features.
Aquariums – Fully aquatic-based enclosure with no terrain features.