Your edit makes even less sense.
1) a foreign customer buying 2) a foreign company selling
Those two happen at the same time. If I’m in Australia and I’m buying something from the US I am a foreign customer (relative to the company) and the company is also a foreign company (relative to the customer)
If you want to export anything you have to follow the laws of the country you’re exporting to.
Import/export laws mostly affect stuff that's going to be resold again, and involve local subsidiaries or contracted distributors.
The two cases I listed do not happen at the same time. Try some other, more charitable interpretation.
If I went out and bought something out of my country, the seller never tried to sell in my country and it makes no sense they would have to follow my local law.
If the seller went out and started selling (doing marketing etc) in my country, that's a different story.
If I'm in Australia and I buy a new alarm clock from an online store in Japan, the alarm clock does not need to meet Australian standards. It's the customer's risk to take.
These are very significantly different cases:
1) a foreign customer buying
2) a foreign company selling
In the first case, the company follows their home law only. On the second case they would have to follow the local law of the customer's country too