Japanese smiths discovered, similarly to many others, that iron sand (with little to no sulfur and phosphorus) heated together with coal (carbon) made the steel they called tamahagane.
Depending on the amount of carbon introduced, this process forms either the very hard steel for the edge, called hagane, or the slightly less hardenable spring steel, called kawagane, which is often used for the sides and the back.