When we talk about the Puritans who came and settled in New England, we typically say that they came in search of religious freedom. But this is not true, or at least not in our modern sense of the word. The Puritans did not believe in a vision of religion in which all people were free to worship in their own way. Instead, they believed that they should impose their religion on any society in which they lived. So, they did not oppose religious intolerance; they wanted to be able to impose their own ways on others.
The Puritans believed in something that is sometimes called the “national covenant.” They believed that God had made a pact with them in which he would bless their country if they would create the sort of society that he wanted. Therefore, it was very important for them to have an established religion and to punish dissenters. They were simply trying to ensure that they kept their end of the bargain with God.
In short, then, the Puritans established their own church and punished dissenters because they believed that was what God wanted.