I had thought that hats went back much farther than that...
"Then these men were bound in their coats, their hosen, and their hats, and their other garments, and were cast into the midst of the burning fiery furnace."
- Daniel 3:21.
Seems you were right about the soot and ash, though.
Regards,
Hats have absolutely been around a lot longer than the Industrial Revolution. My knowledge of them prior to that period is admittedly hazy. My understanding of them and their purpose generally revolves around the soot/ash discussion, but I do understand that they serve many more purposes.