It's a weird logic that I guess is there to allow for caverns to support plants (where things to the other way, i.e. when you cut a cavern tree you're left with rock). As far as I've seen (mostly using "probe") there's no info for what the floor actually is made of underneath the growth. You get mud on a stone floor, but when moss grows in the mud you have moss under the mud, and when the mud is removed DF seems to calculate what the material should be (if there was a growth: otherwise the info is still present) using some logic based on what's present further up in the geo biome.
I believe it would be possible to write a script to revert soil to the basic kind of rock for that layer (i.e. ignoring things like gems and ores), but I'm not aware of anyone doing it.
If you're able to clear away the mud before anything grows in it the rock stays rock. Too late for this case, but possibly marginally useful for the future (marginally because it's a lot of micro management to carve tracks/smooth rock/carve tracks... while the water is evaporating).
Comment on Urist9876's post:
Using DFHack to remove growths would involve both changing the tile (probably with tiletypes or a script that used that logic as part of the process), AND removing the plant entry for the data structure (possibly tile block, or maybe NE block of 3*3 block of tile blocks). I can't guarantee that's sufficient, though, but both places should be updated.