You were probably taught not to use your high beams in the fog. Do automatic high beam systems know this, too? And how do they work in the first place?
UV rays cause headlights to yellow or fog up over time. Scrubbing away dirt and damage will help restore them so light can better shine through.