The observation behind the belief is real and anyone with a wood fire could make it. Salamanders hibernate in rotting logs. A log goes on the fire, the animal wakes and runs out through the flames, and its skin secretes enough moisture to survive the trip. Something that comes out of a fire alive and cool to the touch looks like it is extinguishing what it walks through, which is exactly what the ancient accounts say.
From there the claim moved to material. Cloth that could be put in a fire and come out clean was sold in the medieval and early modern world as salamander wool, said to be woven from the creature's hide or hair. It was asbestos. Marco Polo, who saw the mineral being mined in Central Asia, said so plainly and complained that the story was a fraud, and he was ignored for several more centuries.
The animal also became a device. Francis the First of France took a salamander in flames as his personal emblem with a motto about nourishing and extinguishing, and it is carved and painted throughout the chateaux built in his reign, at Chambord in particular. By then the creature meant something closer to a ruler who survives what destroys others. When Paracelsus assigned the salamander to fire in his scheme of elemental beings, he was formalising an association that had been running for well over a thousand years.