The Massachusetts Bay Colony was founded by religious dissenters who wanted to leave England because of the persecution they were experiencing while Charles I was on the throne.
In 1628, a group of Puritans was able to secure a land grant through the Council of New England and pursued a for-profit project called the Governor and Company of Massachusetts Bay. By 1629 there were small colonies at Cape Ann and Salem, and the group of Puritan businessmen received a charter from Charles I. It began as a trading company run by Puritans who established a theocratic government.
By 1630, John Winthrop had spearheaded the arrival of around 1000 people who ultimately settled near Boston. In ten years time, the population grew to 20,000.
There was no distinction between the colony and the Massachusetts Bay Company until 1684 when the charter was revoked. A new 1691 charter was granted, and remained in effect until Massachusetts ratified its own constitution in 1780, after the Revolutionary War.
In short, the colony was founded so that some prominent English religious dissenters could undertake a venture in the New World where they would be free to worship as they wanted and prosper economically.