"On this day in 1765, Parliament passes the Quartering Act, outlining the locations and conditions in which British soldiers are to find room and board in the American colonies. The Quartering Act of 1765 required the colonies to house British soldiers in barracks provided by the colonies." This is what the quartering act is.
I think they passed the quartering act because they wanted to keep an eye on the colonists and make sure they were not breaking the rules.