Are you sure it's illegal? Like 80+ percent of the doctors in my metro area got their degrees in India (where they immigrated from). There is some form of reciprocity going on.
Foreign doctors still need a US residency. The number of slots for residencies is capped. I could imagine a world where the US signs reciprocal agreements with EU countries to honor their medical professional training without a residency. I cannot imagine the same for India or Argentina.