Why is it a strange hypothetical? Extremely similar situations were actually quite common historically. Many, many ethnic groups have been intentionally excluded from many types of jobs over the years. It's not just a hypothetical: It's a past reality that has real-world impacts that last through today.
https://www.americanprogress.org/article/occupational-segreg...
https://prospect.org/features/black-workers-remember/