Dirt Leg Valve

Hello All,
Found this in an inspection and wondered if it would be considered a defect. Notice the rigid gas lines and in the far corner a flexible line. At the attachment point of the flexible line there is a dirt leg with a ball valve. Not sure why, but just makes me think.

yes there should be a dirt/drip leg and that elbow currently needs a plug not just a valve.

Mike is correct, it needs plugged in case valve accidentally gets turned on. It is most likely for a gas clothes dryer.

Yeah, plug that baby.