The US has pretty good foreign security and border control agencies, and so it knows a lot about anyone who travels internationally.
It does not have a dedicated domestic security agency.
Richard Posner pointed to this gap in a series of books after 9-11.