A question like this is more theoretical, so there is no 100% answer for it. But, from my perspective, you can think of it in two ways.
From the Pokemon side of it, Toxapex can already learn other ice moves such as Ice Beam and Frost Breath, as well as a weather affecting ice-move, Hail. So, the ice-typing of the move is not peculiar. The move Haze itself just resets its stat changes, and a lot of Pokemon can learn similar moves such as Psych Up and Clear Smog.
For its biology perspective, being the Crown-of-Thorns Starfish, "When the starfish is removed from the water, the body surface ruptures and the body fluid leaks out, so the body collapses and flattens. The spines bend over and flatten, as well. They recover their shape when re-immersed, if they are still alive". So, the move Haze is actual quite appropriate because one, you can only use the move when still alive, and two, it's sort of a way for the Pokemon to "reshape" itself.
Hope I helped! :)