Kuke explained it a while ago Pretty sure it randomly generates coords, and checks to see if it is land or water, if it's lava, etc. And the constant checking makes lag
This is basically it, yes. It keeps generating new coords and checks them until a good spot is found. (fun fact, typing /wild water in a world without water will crash the server!)
Please let me join your "UnWater" team I hope it goes better than the old "Strip The Mining World Til It Is Gone" team