What is this for?

What is the purpose of the plumbing on this exterior wall? On the interior side is a fireplace, not a kitchen or bathroom in the vicinity nor does this house have pool or spa.

Possibly an AC condensate pump being piped into a trap then into the house sanitary main drain.

Natural gas hook up if you want to convert it?

My guess is the house is on a concrete slab and they added a water softener or dishwasher and needed a way to drain it into the sewer system so they took the path of least resistance. It has an air gap device to prevent contamination of the water supply. I assume you live in a warm clime area, if not the trap would freeze.

Those are all good answers. Thanks! I think it’s for the water softener.

I would say water softener too.