I have not had the water heater go bad on me, HOWEVER....
I replaced it before starting work. At the time, it was in the 10 year old range and I KNEW that as sson as I got the finish floor down is when it would go.
To answer your question, my water heater is right next to the equipement and the mechanical room opens into the finsihed space.
I also installed a Dricore subfloor. I was/am hoping that in the event the water heater goes, the water will run UNDER the floor to the nearest drain. Also, during one of my inspections I was told that to pass final, the pipe from the overflow pressure valve has to be exteded TO the drain. Which is only about 2' away.
Now, floods from hurricanes are a COMPLETELTY different story, and I've had TWO of those due to sump pump failures. Both times I didn't have carpet or laminate down yet. Now that the finish floor is down, I watch it like a hawk, and we've had a LOT of rain this year.