Both of ‘tea’ and ‘cha’ are originated from Chinese word 茶. The root for tea is ‘te’ as how it’s pronounced in Min Chinese (mainly used in coastal Fujian Province - remember coastal). ‘Cha’ is how it’s pronounced in Mandarin and Cantonese. How could this duality happen?
How it’s called where you are living depends on how it gets to your place historically. It will sound like cha if spread across land (through the Silk Road) and sound like tea if spread over the sea (by the Dutch - they encountered tea first in 1607 around Fujian and has their own trade routes).
Take the word ‘teh’ in Bahasa, it clearly means that it’s brought by the Dutch colonisation in Indonesia. Same goes for the French thé, the German tee and the word tea in English itself. Fun fact about English tea though, once introduced by the Dutch, they became so hooked that they planted opium in India to be sold in China, just to have a product that China would be willing to trade for tea (but this triggered a conflict between China and Great Britain afterwards because opium destroyed the Chinese community).
How about cha derivatives? Tea was traded more than 2000 years ago following the trade routes of Silk Road, which results in chay in Urdu, shay in Arabic, and chay in Russian. After making its way to Central Asia and Russia, it moved further to sub-saharan Africa resulting in chai in Swahili.
The minority of places where neither cha/te derivatives are used is usually a place where tea grows naturally so locals invented their own way to refer to it. The example for this is lakphak in Burmese.
Here’s a map showing the words tea across the globe taken from Quartz. And congratulations you have just learned a new word in nearly ever language on earth.