It is actually a very useful component of the gas line known as a sediment trap.
Sediment trap furnace.
The sediment traps at my furnace and water heater were completely empty.
Cmc 904 2 1 a sediment trap shall be installed on the gas line downstream of the appliance shut off valve and as close to inlet of the equipment as practical.
A sediment trap which is sometimes called a drip leg although technically different is a capped off section of gas line which is installed in such a way that any debris or moisture in the gas line will be caught in the trap where it can be cleaned out easily.
Most water heaters do not have a sediment trap in them.
The sediment trap shall be either a tee fitting with a capped nipple in the bottom opening of the run of the tee or other device approved as an effective sediment trap this means that all gas furnaces water heaters boilers unit heaters and gas packs are required by code to have a sediment trap in the gas line ahead of the equipment.
Sediment traps are intentionally installed to help prevent sediment in the gas piping from getting into the gas valve or burner area of an appliance and fouling things up.
Sediment traps sometimes mistakenly referred to as drip legs are designed to catch sediment in natural gas before it enters into the water heater or furnace gas valve.
Different areas have different contaminants in the gas and the traps help catch these.
Did the plumber possibly leave it in case you wanted to add to the line.
The clear space and distance to combustible materials around the furnace unit shall comply with the manufacturer s installation instructions.
The reason for this is to ensure safe operation of an appliance by keeping debris.