purpose of this?

Not sure what this is. Mounted above a laundry sink on the cold side. Sorry for the bad pic.
Oh yeah, Galvanized pipe.

Sorta looks like a pressure regulator, but I can’t really tell unless I saw the markings…

http://www.westsidewholesale.com/plumbing/water-pressure-regulator-valve-with-brass-housing-bronze-1-2.html

Pretty blurry picture for me so I’m just guessing here but it looks like it might be a pressure only relief valve.
I have seen those installed before to relieve high pressure caused by expansion on a closed system.
They open to let out a cup or two of water to keep the pressure-temperature relief valve on the water heater from wearing itself out, so to speak.

Looks more like a pressure relief valve - was there any other piping connected that we cannot see in the picture or just an open port?

Just the cold side of a laundry faucet just below the valve.