Great question — answering as the UphillTech team:
That's a "pipe union", or just a "union fitting." It exists to provide an easy way to adjust pipe position or direction, or provide a way to insert and remove a fixture like a meter, without having to dismantle all the surrounding pipe work. This particular model works by the threaded nut compressing the two parts together. The "shoulder" inside the nut pulls the upper part down, while the threads of the nut lift the lower part up. The quality of the seal produced by the union depends on the condition of the mating surfaces being compressed together. So if you have a leak, I suggest you first aggressively clean the lips of the upper and lower part where they will go together. Note: I said...
Full answer by aghast: https://diy.stackexchange.com/a/299084 (CC BY-SA 4.0).
Need it done for your business? UphillTech.