CPVC shouldn’t be in the slab. It gets brittle over time.

The hole is so you can hook the drain to the trap. It looks big until you start to hook it up. Do not fill it in. If concerned about critters, spray some bug spray in the hole before you close up the wall.

The water came out the cold pipe because it fed backward through your water heater. The cold line being uncapped there gave the air a place to go. That’s the only connection where cold and hot mix. Cold goes into water heater, hot comes out.