In most countries they just want a negative test from the origin country, so the country being visited doesn't have to spend a test for the tourist. But it's not bulletproof, if someone tests false negative and flies and infects a few others.
Other countries (Taiwan, NZ?) quarantine you for 14 days on arrival, and also test you...