Except it’s rarely the “same car”. For example a Tesla Model 3 manufactured in China has an LFP lithium-ion battery, while the US manufactured ones use an NCA lithium-ion battery. It’s by far the most expensive component of the car and LFP batteries are much cheaper.
There are often other differences too - such as optional extras being standard in one market. And warranties vary (those are not free - it costs money to fix faulty cars and they factor it into the sale price).