Tolkien's Middle-earth exists within the realms of myth and fairy tale. Magic is still part of the world and has an effect upon everything within it. Men, Elves and Dwarves can understand the speech of birds and some beasts. The Great Eagles and the ravens of Erebor can speak the tongues of Men. Even some Men, such as Beorn or the Mouth of Sauron, are capable of wielding powers of sorcery and transformation.
I think it was unintentional foresight that made Tolkien give crows not only a language, but some kind of implied civilization, as if he were aware of all the future studies that would show the insane intelligence of crows and ravens and that perhaps they were even smarter in the magical past.