This was a tangent starting with "I find the RealID opposition baffling." at https://news.ycombinator.com/item?id=48983452 .
I oppose Real ID because I don't understand the problem it's trying to solve, and it seems expensive and cumbersome for at least some.
Real ID is a US-only issue, so I interpreted "If you are worried that your tenant might happen to be an illegal migrant" in the US context.
In the US case, quoting https://www.eeoc.gov/national-origin-discrimination :
National origin discrimination involves treating workers (applicants or employees) unfavorably or favorably because they are from a particular country or part of the world, because of ethnicity or accent, or because they appear to be of a certain ethnic background (even if they are not).
National origin discrimination can include preferring foreign workers, including workers with a particular visa status, over American workers.
National origin discrimination also can involve treating people unfavorably because they are married to (or associated with) a person of a certain national origin.
In where you live, and where you used to live, a business can refuse service to a minority group? To indigenous people? What about to someone whose boyfriend is a member of a minority group?
You write 'exercising their basic rights of liking and disliking whoever they want (and consequently making or not making commercial agreements with them)'.
The "consequently" is doing some heavy lifting. In the US you have the basic rights of liking and disliking whoever you want. This is part of the freedom of assembly, which is the US way of saying the freedom of association.
Commercial agreements for services available to the public, however, are interpreted under different rules than private agreements. In the US you are free, under the law, to run a private club which refuses black people, Jewish people, women, and so one. These all exist.
However, if your club is open to the public, then you cannot discriminate on race, religion, or sex.
(Technically the US had federal civil rights laws, which under our federal system only apply to businesses large enough to nominally be involved in interstate commerce. However, state laws essentially extend this to everyone, with a few carve-outs for, for example, a women looking for a housemate and insisting they be another woman.)
Do you live in one of the handful of countries which are not signatory to the International Convention on the Elimination of All Forms of Racial Discrimination? Quoting from https://www.ohchr.org/sites/default/files/cerd.pdf
"In compliance with the fundamental obligations laid down in article 2 of this Convention, States Parties undertake to prohibit and to eliminate racial discrimination in all its forms and to guarantee the right of everyone, without distinction as to race, colour, or national or ethnic origin, to equality before the law, notably in the enjoyment of the following rights: ... The right to housing .. The right of access to any place or service intended for use by the general public, such as transport hotels, restaurants, cafes, theatres and parks."
Almost every third-world country is signatory, so it can't be some broad "third-world brain" viewpoint.