“Tongues” is the Old English word for “languages.” So, “tongues” appears in the King James Version. When more modern translations came about in the late 1800’s, the Pentecostal movement had developed their practice of babbling and calling it “tongues,” as if it were different from “languages.” So, the publishers of the newer translation kept the word “tongues” so as not to alienate a large purchasing audience.
Jesus predicted that the gospel would go to the whole world before the generation of His time passed away (Matthew 24:14, 34). To accomplish this, God needed to give them some help. One of those helps was miraculous language-learning. For example, Paul would have had to learn more than a dozen languages just to communicate with the different groups on his first missionary journey (and more languages for the other journeys). Rather than spending a few years learning the language of each people, God helped Paul by putting the skill of speaking and understanding that language in his head. God did this for a significant number of those who needed to be able to communicate with people of other languages.
Corinth was an international seaport, so many languages were spoken there. The faithful of Corinth needed help reaching the visitors to Corinth. God gave them that skill. But, some of them felt self-important because of that miraculous skill, so they started showing off by speaking that different language even when no one understood it. Paul corrected their problems in 1 Corinthians 14. Note that, in 14:22, speaking in foreign languages was a sign to unbelievers, not believers. Yet, “tongue-speakers” today mostly babble to each other.
This miraculous gift had a purpose in the first century, so that gospel would get to the whole world before the Temple was destroyed. After that, the faithful are on their own. Paul wrote (1 Corinthians 13:8) that miraculously learned languages would stop being given when the gospel was complete. That happened about 1950 years ago.