For the same reason that foreign nationals can join the military, including the Coast Guard that has an overlapping mission: it's a nation of immigrants and for centuries until very recently most Americans readily recognized the value and necessity of recruiting foreign people into various posts.
> for centuries until very recently most Americans readily recognized the value and necessity of recruiting foreign people into various posts.
You forgot to mention that, for those centuries, US immigration was effectively whites-only, until the 1965 Hart-Celler act (that politicians promised wouldn't change this!): https://en.wikipedia.org/wiki/Hart-Celler_Act