How did people so long ago figure out stuff like that? There were some really smart characters way back then.
I always wonder the same thing, how could there have been all smart people living the village life way back when and in ten generations, so much scientific advance?
Most of it was probably accidental discoveries. Glass came from hot campfires upon sand.
The ancients didn't have chemistry. They just learned what types of dirt did useful things when accidentally present. Then they gathered that dirt and used it with the process. It probably happened mostly at sloppy forge sites. ;-D
Once interesting side affects were observed regarding different "earths", people included them in their procedures and even started experimenting with additives.
People have always been good observers.