Good question!
I suspect it's caused by tempering the steel either intentionally (for aesthetic reasons I presume, perhaps by welding) as in the OP's link, or unintentionally caused by hot exhaust gasses. Basic steel is carbon and iron and forms all sorts of compounds based on the arrangement of the carbon and iron and other metals in the steel. I poked around the web and Britannica but the actual chemistry is rather complex, as are the many varieties and grades of steel.
Older style razor blades were often blued steel, and one can blue a drill bit pretty easily. These are heat treatments though other processes can blue steel. Quenching, which is probably a type of tempering but I'm not sure, can turn steel blue. Gunsmiths used bluing - chemical or heat - to resist oxidation (see wikipedia).
Hope you can get better answers!