I’ve noticed some of these “foreigners only” toilet facilities here in Sri Lanka.
They seem to be around touristy areas, where foreigners pay a higher fee. The (controversial) idea is that Western visitors might have higher expectations of hygiene than what is often found in public toilets. -S 🇱🇰