It's because salamanders sometimes like to hide in firewood left to cure. They'd obviously flee for their life when it got lit on fire, so the ancients thought they spawned from the fire. Presumably, they figured any salamanders they saw elsewhere got their start that way. How they missed them...