Why do ships have to be named, such as XX number, but cars, planes, and tanks don't need to be named, just letters or codes plus numbers?

Not all ships have their own names. Many ships with smaller tonnage only have numbers: the name of the port to which they belong plus a number. Vehicles, aircraft, and tanks will also be named. For example, my country's "Mao Zedong Locomotive," the "Wang Hai" fighter jet displayed in the military museum, and the high-speed rail are also named "Harmony."