We just redid bathroom/ laundry and noticed that washer 3prong and gfci were beside but below washer shutoff and drain. Isn't it dangerous to be so close to a water source and why didn't contractors or inspector notice it
Well, the GFCI receptacle will protect things plugged into it. However nothing protects the GFCI receptacle, and if water gets into the junction box behind the GFCI, it can potentially "go around" the GFCI and electrify the walls or a puddle.
The right answer to that is to move the GFCI to a location that feeds this location. This might be another receptacle somewhere, or it might be straight to the circuit breaker itself. Locate a GFCI there, either as a receptacle at that location, or a GFCI breaker. Then, place the line to this washer location on the
LOAD terminals of that GFCI. Fit a plain receptacle here. Now, if water gets into the junction box, that upstream GFCI will trip and protect the wire, receptacle, and everything plugged into it.
While I might not want it below the water connection, the GFCI is there to make sure that if there's ever a leak that causes a grounding event, it cuts the power off before it becomes a shock hazard.
Modern washer hookups are in a box designed to minimize the chance that water leaves the box. Note that the drain is lower so that any leaks go down it. The real risk would be a drain overflow, but if that happens you'll have much larger issues.
If you want to make this safer, I would put a GFCI circuit breaker on the circuit. Less convenient if it trips, but guaranteed that if water ever got in the box and caused a grounding event, the power would cut off.