It's baseless to say that they are equal; the employer obviously preferred someone else. Why should we discriminate against people based on nationality? We get a more competitive, more efficient, more productive economy by opening it to more people.
Another answer to your question is, so that Americans can get jobs in other countries.
Another answer to your question is, so that Americans can get jobs in other countries.