"Christianity neither is, nor ever was a part of the common law." - Thomas Jefferson
Jefferson had to deal with the settlers of the America being of a mix of religions, Catholic, Puritan, Quaker and others. And also he was aware that declaring one faith official and persecuting the others had caused problems in Europe. This had a lot to do with bringing in the separation of church and state. And with preventing the government prohibiting freedom of religion.
Freedom of religion is more core to the US then any other law or concept. Freedom of speech was written to ensure freedom of religion, not the other way around.
In any case freedom of thought is not the same thing, freedom of religion includes actions, not just thought. And in order to avoid making freedom of ANY action, we limit it to actions required by religion. (And yes, that causes problems when people invent new religions that have actions some object to. Nothing is perfect, these things are dealt with as they come up.)
It exists because people want to to exist, and the US is a democracy.
Note that democracy means the rule of the majority (or plurality), and not necessarily equal rights for everybody, which would be an a-priori decision unrelated to the democratic process.
EG: These rights don't require democracy but are "god given".