The Ah”S suggests that even though gerama is permitted, to be “goreim gerama,” to deliberately cause a gerama to take place, is prohibited. For example: if a person had the shem Hashem written on his skin and deliberately stood under water for the sake of erasing the shem, that is the same as just taking an eraser and rubbing it out. Just because the water is doing the work and not the person makes no difference. Therefore, since the gemara’s heter of gerama applies in such a limited uncommon scenario like going to mikveh, the Shulchan Aruch omits the topic entirely.
I don’t know how to make sense of the Ah”S’s chiddush once we take it out of the context of erasing shem haShem and try to apply it to other areas. The gemara writes that melacha is prohibited on Shabbos, but gerama is permitted. The gemara gives an example: placing barrels of water in the path of a fire, so that when the fire hits the barrels and explodes them, the water will extinguish the fire. According to the Ah”S, why is this permitted – isn’t it being “goreim gerama” since the intent obviously is to extinguish the fire and setting the barrels in its path is just a ruse to indirectly accomplish that goal?