This legend is historically based in fact.
The first lead-acid batteries consisted of glass cells that were enclosed in tar-lined wooden boxes, a damp concrete floor could cause the wood to swell, breaking the glass inside.
The Edison cell (i.e. the nickel-iron battery) that preceded the rubber-cased battery was encased in steel. Those that weren’t isolated in crates would discharge into concrete quite easily.
Later battery cases used primitive hardened rubber, which was somewhat porous and could contain lots of carbon. A moist concrete floor combined with the carbon in the battery cases would create electrical current between the cells and discharge them.
Modern batteries have hard plastic shells and concrete is generally an excellent surface on which to place a battery bank. The electrolyte in a battery sitting on an extremely cold floor with very hot air around it could stratify, causing damage from sulfation; concrete provides good thermal mass to buffer any temporarily extreme temperatures in the battery compartment.
You don’t want to know why I would ever need to know all this. Just some more, once thought useless, factoids from another life.