Slavic languages divide their consonants into hard and soft, and the distinction does more work in their grammar than any other single feature of their sound systems. The vocabulary for it comes out of the alphabet.
In Old Church Slavonic the two reduced vowels, the back jer and the front jer, were real vowels, short and weak but pronounced. What they did in addition was tell a reader about the consonant in front of them: a front jer implied a softened consonant, a back jer implied an unsoftened one. When the reduced vowels themselves fell silent, that secondary function was all that was left, and the letters stayed in the orthography doing nothing but marking the quality of the preceding consonant.
At that point a letter that had been a vowel became a diacritic with the shape of a letter, and the names followed the new job. The tradition began calling them the hard sign and the soft sign, borrowing the adjective from tverdo, and the terms hard and soft passed from the description of the letters to the description of the consonants themselves, and from there into every grammar of every Slavic language written since.
The sequence is worth stating in order, because it is often given backwards. The consonants were not named after the letters in the first instance. The letters were vowels; they marked a consonant quality as a side effect; they lost their own sound; and the side effect became the whole of their meaning, taking the name with it.