The layer of charcoal and salt helps to maintain low resistance for earth fault currents. Because of ionic behavior of salt and charcoal they will maintain moisture content around the earthing pit.
Nice explanation
If we add salt and charcoal then the soil resistance will become low and the leakage current can easily flow into the earth.
Adding charcoal and water in earthing pit decreases soil resistivity.
The layer of charcoal and salt helps to maintain low resistance for earth fault currents. Because of ionic behavior of salt and charcoal they will maintain moisture content around the earth pit.
The salt and charcoal improve the conductivity of the soil, thus it lowers the earth resistance and fault current can easily pass in the ground.
https://www.electricalampere.com/post/why-charcoal-and-salt-are-added-in-earthing-pit