Firstly thanks to Brains for posting this, and secondly apologies for a rather long and technical reply. I strongly suspect that this bolt was placed on a sea cliff and in a position where sea water could get into the gap between the hole and the bolt. All corrosion of steel is electrical (galvanic) in origin, and requires two things - an electrolyte and oxygen. In the case of a mild steel bar submerged in sea water, electric currents are formed between phases of the microstructure of the material. These small corrosion cells are distributed all over the surface of the material, hence more or less uniform corrosion. When differing materials are placed together, as stated above, larger electric potentials can be created (the voltage being dependant upon the position of the two materials in the galvanic series). The rate of corrosion is dependant upon the voltage, the higher the voltage the more rapid the corrosion, and the corrosion occurs preferentially at the anode. Place a bi-metallic cell into salt water, with lots of free chloride ions, and the result is not far short of Alka-Seltzer.
This can all be made much worse if the electrolyte can be made stagnant, such as in a narrow gap, as this allows concentration of the electrolyte to occur, rapidly increasing corrosion rates. This process occurs in pitting and crevice corrosion. Failure is seldom due to a single factor, and it can be dangerous to speculate, especially from a single photo. However, from what I can see, it appears that we have a mild steel bolt attached to a stainless steel hanger. This immediately means that the hanger is the Cathode and the bolt the anode, so we would expect the bolt to corrode preferentially to the hanger. Now, if the hole were wet, we would have (salt?) water in the gap between the bolt and the hole, which creates ideal conditions for crevice corrosion. The bi-metallic corrosion cell between the stainless hanger and mild steel bolt would start the process going, and the stagnation of the electrolyte in the hole would accelerate the process, and make the material in the hole more anodic, leading to preferential corrosion of the bolt within the hole in this case. The lack of corrosion on the mild steel outside the hole is therefore explained, and in fact this material would be partially protected as the crevice mechanism will tend to make the material outside the crevice more cathodic in nature.
If the bolt had been stainless, there would have been a much lower corrosion cell voltage in the first place, which at the least would have slowed the initiation of the crevice effect, and may have prevented it. I suspect that in fresh water that the process would be very much slower (though it can still occur) and of course as Roy has pointed out it can be accelerated by electrolytes other than salt. Fairly recently I removed a 50 year old half inch mild steel rawl bolt from a cave. The hole had been "moist" for all of that time, but the bolt was not corroded beyond some discolouration on its surface. In fact it screwed out of the sleeve perfectly.
Finally, this is a pretty spectacular example of corrosion, but there are other mechanisms that can lead to just as dangerous situations with just as little warning - stress corrosion cracking being perhaps the scariest. As others have stated, all bolts will eventually fail...
The links below provide some light background reading on corrosion...
http://www.marinecorrosionforum.org/explain.htm
http://www.steelconstruction.info/Corrosion_of_structural_steel