I had a similar experience when I had a second visit to a private university
in a southern state. Basically, it turned out that the department extended
the offer to the first choice, but they were worried that the first choice
would decline their offer. So they also invited the second choice (
unfortunately me) for a second visit.
My lesson from this experience is DO NOT trust anything until you get a
legal document signed by the dean (even for this, there might still some
changes). Before you get this legal document, apply as many as you can, and
keep doing interviews (don't decline any potential opportunities). On the
job market, no one cares your interest except yourself.