Good home-repair question — answering as the UphillTech team:
It is highly likely that that piping arrangement is made that way to facilitate the installation of a water softener. A water softener will have a need to accept a pipe with incoming hard water and another for the outflow of conditioned water to the rest of the residence. When a water softener is installed the U shaped fittings at the bottom of those two pipes would be removed and replaced with a new setup that usually consists of three or four valves. The valve setup allows for bypassing the softener, allowing water into the softener and also a configuration to backflush the unit. These days...
Full answer by Michael Karas: https://diy.stackexchange.com/a/184450 (CC BY-SA 4.0).
Need help with this? UphillTech.