Saw a home recently on a slab with the water heater about dead center... the heater was on a pan that drained to a gravel area about 12" square.... looks like someone just cut a hole in the slab and dug it out and then filled with rock.
There is always gavel under a slab. And, depending on how well it was compacted when it was filled, there can be a sizable void over time.
It's a big french drain. And, it can potentially take a lot of water.
A floor drain, or sump, should be near by the water heater, when it's located on a slab, in any case. Not doing so, is poor planning.