People think early European immigrants to America were seeking religious freedom. In fact, they sought escape from religious persecution. Not quite the same thing.
The policy not to molest or hinder those practicing even what were seen as false religions took time to crystallize. Gradually, however, tolerance came to seem sensible — or at least preferable to other options. Eventually, the children of the Enlightenment who designed the American system of government proclaimed freedom of religion a right — a right endowed not by those wielding political power but by the Creator. This was a revolutionary idea. In most of the world, it’s still a revolutionary idea.
People think the Founders were idealists. In fact, they were realists.