Indeed, I saw some parts that looked pretty similar at Lowes in copper but not exactly the same.
It's a connector for a toilet bidet-type spray head attachment. It interrupts the water supply from the wall to the toilet.
The function seems like a pretty standard thing to do; I'm just wondering if the part itself is a standard thing. I didn't see the part for sale at the local hardware store.