The reason this was put in was that 12 of the 13 colonies had specific religious requirements for officeholders (and VA was working on theirs) and they did NOT want the feds to interfere with them. For example, Delaware required belief in the Trinity; others required belief in Christ.
The current interpretation of the First Amendment is a travesty...it is the First Amendment that counts, not what Jefferson wrote to the Baptists of Danbury in 1802.
Jefferson didn’t write the First. One of my ancestors, John Leland, with james Madison, wrote it.