It is gas and my guess is that someone once had a gas heater in the garage around here it is common to have one and just fire it up when using the garage as a workshop in the cold months.
They used to put gas meters in garages but prefer them to be moved outdoors now if any changes made to the system.
If anything is removed from end of gas pipe, the pipe is to be capped off for safety reasons, not just turned off at the valve shown...
Hopefully not your gas service, you don’t want high pressure inside any building. Where is your meter in relation to this? If it runs from inside the garage to the outside, the union should have been below that valve. Maybe a portion of your houseline. Do you have any outbuildings with gas in them? Fire pit, bbq?