I am relocating my pool equipment to the new location. I have gas heater that heats up the water in the pool. The hot water line is CPVC 2 inch that goes into 1-1/2 cooper pipe (may be 4 ft) that goes to PVC or CPVC line (I am not sure I need to dig deeper) under the pool.
Can some one explain to me why do I have this cooper section. Are there any safety concerns?
The pools is around 20 years old.

Would it be possible to replace the cooper section with CPVC line. I do not mind soldering but using cement is much easier.