why was this amendment passed?
In response to Anti-Federalist objections to the new Constitution
Third Amendment to the United States Constitution
The Third Amendment was introduced in Congress in 1789 by James Madison as a part of the United States Bill of Rights, in response to Anti-Federalist objections to the new Constitution. 
the third amendment to the us constitution has to do with Placeing restrictions on the quartering of soldiers in private homes without the owner's consent, forbidding the practice in peacetime
wiki:19623115
Third Amendment to the United States Constitution [SEP] Introduction
The Third Amendment (Amendment III) to the United States Constitution places restrictions on the quartering of soldiers in private homes without the owner's consent, forbidding the practice in peacetime. The amendment is a response to the Quartering Acts passed by the British parliament during the buildup to the American Revolutionary War, which had allowed the British Army to lodge soldiers in private residences. The Third Amendment was introduced in Congress in 1789 by James Madison as a part of the United States Bill of Rights, in response to Anti-Federalist objections to the new Constitution. Congress proposed the amendment to the states on September 28, 1789, and by December 15, 1791, the necessary three-quarters of the states had ratified it.