This is easy. Sub way means beneath the way. Underground means under the ground. Both indicate the same. In the same way Brits call the trains the tube.
This is its shape and it runs through the tunnels like toothpaste fitting closely into its container. Just because America is a huge and rich country it doesn't mean that its names for things are universally adopted.
The British call their subway system by several names, including metro and underground, but the most common name used is “The Tube”. This is apparently because the British already used the name “subway” for an underground passage that could be used by pedestrians to cross under a road or street.
The Tube got its name because, for the most part, it travels inside a tunnel or tube. There are many examples of words in English that mean different things between British English and American English so it is not surprising that this is just another example.