The British troops were there to defend the colonists, as King George II did not want the colonists to arm themselves.
The colonists relied on the British troops to defend them both before and during the French and Indian War. King George II was fearful about arming the colonists, as he didn't know what would happen. He trusted his own troops more and had faith in them that they would protect the colonists.
Some colonists were not thrilled about this and many thought that they should be able to defend themselves. They also weren't happy with Great Britain, as they kept putting taxes on certain products without their say. This lead to the idea, "taxation without representation", and Great Britain was justifying this by saying they needed extra money to pay for the French and Indian War and they were deploying troops to protect the colonists. The colonists still deemed this unfair.