It’s to bypass the heater tank for when you winterize the RV.
It allows you to empty your heater tank and run antifreeze through the cold water lines.
The center valve is part of the water heater isolation system. Without it your hot water will be mixed with the cold and vice versa. You need it
You can easily replace it with a 1/2″ Flair-It shut off valve with pretty common tools . It can be used with the gray pipe . We have a 93 Fleetwood Jamboree with same pipe and have not replaced it .
By the way the middle fitting should be closed for normal use of the water heater . In the picture provided it is in the open position which will mix your hot water with cold water .
This is your hot water tank bypass valves. If you don’t have the center valve, your hot water heater would not work, since water could still bypass it.
What year is your rv that gray maybe before 1995 so it’s not pex it’s polybutene hose
Replace every single one of the fittings/elbows with brass and get a pex crimper. Short work.
Looks like water heater bypass. If you remove the valve you won’t get hot water.
Go to the hardware store and get a sharkbite 1/2″ ball valve. Rip the broken one out and replace it.