Any idea what this loop is?

Could it be a jury rigged vent?, It just goes up and loops back down.

It’s an improperly configured loop vent (aka: island fixture vent) installed in a location/application where a loop vent is not permitted.

As Chuck said.

Thanks to you both. As far as I can tell from my research, the only time they are allowed is under the island sink, because there is really no other way to vent a sink at that location besides an automatic air vent .

So the cast iron pipe on the right should lead to a vent rather than a fixture, correct?

The stack should extend through the roof, though it’s not feasible because of the staircase.

Though it’s improper, I understand why they did what they did. They could have at least configured the loop vent properly (i.e., larger dia than the drain it serves to prevent siphoning, cleanouts to support rodding in both directions, proper fittings for the loop).

I’m curious where the commode ties in and how it’s vented.