Normally xargs reads its list from standard input. That has a side effect people run into sooner or later: the command it starts inherits that input, which is already used up.
xargs -a hosts.txt -n 1 ssh-keygen -R
-a (long form --arg-file) reads the items from a file instead. xargs -a list echo got prints got x y, the same as piping the file in.
The difference shows up with commands that read from standard input themselves. If you pipe into xargs, those commands get nothing useful from stdin, and interactive ones like an editor or a program that asks a question misbehave. With -a, standard input stays connected to your terminal, so the command can still read from it.
I also think it makes the line a bit easier to read when the list is just a file, instead of starting with cat file |.
The file is read the same way as a pipe, so all the usual rules apply: blanks split items and quotes are special unless you add -d '\n' or use -0 with a NUL-separated file. And not every xargs has -a. GNU and the BusyBox one in Alpine do, the macOS one doesn’t, so for scripts that must run everywhere a redirect, xargs ... < list.txt, does the same except for the stdin part.
Further reading: xargs(1) manual page, GNU findutils manual: Invoking xargs