In Tamil Nadu it is called Punducheery. Yanam is in Andhra Pradesh and again I guess there is another territory where it exists. A slightly detailed insight into this will be most welcome.
Consider the USA. This is composed of several places that are not connected. There is the main part of the USA "the lower 48", and Alaska, and Hawaii. But they are all politically united and they are all "USA"
In India the former French colonies of Pondichéry, Karikal, Mahé and Yanaon chose to become a politically united Union territory, even though they are not connected. This Union territory needs a name. It could have been called anything, but as Pondichéry was the largest part, that name stuck (albeit with a corrected spelling "Puducherry")
Historically the city of Puducherry was the first to join the Republic of India, and other French territories joined later and merged with the existing Union Territory and the existing name.
So: It is not unusual for a political united territory to be disconnected geographically. It is normal for such a territory to have a single name. And the name is Puducherry for reasons of size, dominance and history.