> The virus is there already, since quite a while.

Sure but adding possible new clusters, is not that good of an idea.
Furthermore, the chances that additional strains arrive there is higher. Unfortunately the Britisch strain is spreading now in Tokyo.

> What kind of tests are available that can show if you're infectuous? That would be really helpful to tackle the situation. So far, I just know about tests that can detect the presence of the virus or antibodies.

In europe we have Antigen Rapid Tests that show results within 30mins. The results indicate whether at the time taken you are infectious. https://en.wikipedia.org/wiki/Rapid_antigen_test

>They are accurate in terms of detecting smallest leftovers of the virus, but not in detecting if someone is infectious.
Agree

> I fail to understand how a 'foreigner' is a bigger threat (in terms of 'protection from a new outbreak') than the locals already carrying the virus and being responsible for all the recent cases (there is a staggering 22% positivity rate in Tokyo today - without these 'dangerous' foreigners).

To stop a pandemic you need to decrease mobility, to do that we had/have lockdowns. Some countries have closed their borders just like Japan (recently) and New Zealand.
The Japanese Government has decided to conduct the Olympic games this Summer with only the Atheles and Trainers getting entry.

"Guests"/ Tourists would not be limited to the games but would like to go sightseeing etc. thereby increasing the amount of people moving around and creating additional / preventable clusters. Where do you have that 22% positivy rate from? This is the total oposite of what the offical stats say. https://stopcovid19.metro.tokyo.lg.jp/en/ I know government stats should be taken with a pinch salt. But a positivity rate of 22% would not be posible to hide, since 22% of the kanto region is 16million people....

> Is discrimination okay, if there are 'reasons' for it? Is discrimination okay, if a majority agrees with it?

So is New Zealand discrimanting against foreigners for having a entry stop? Japan did the same thing New Zealand/Australia and gave the olympic teams an exception.
Furthermore, a countries purpose is to protect their citizins whether they are native or foreign. What is the best and most effective way as an Island nation to reduce the risk and danger to their populace? It is to temporarily halt the issuence of new Visa / Tourist Visa included.

And is discrimination ok? It is difficult to say here are two examples: Purely Fiction

Country X says no entry to African Americans, because they are taller than the populace. This would be not OK

Country Y temporary bans entry to the whole world because of a global pandemic. This would be OK since the goal is not discrimation but the reduction of movement of people.

Both can be argued to be discrimination but both have a different intention. Thus I would say that there is no absolute answer, as is True or False. There are greyzones inbetween. I think the intend and purpose matters as well as who is affected - everyone is affected equaly vs a single group of people. Yes you could define 98% of the world as a single group of people , but still...

BTW if for example Japan would ban all foreigners, because foreigners have a different hair colour, or because they look different in general. Then I would argue against that policy.