Why is Washington DC the country's capital?

It was built between 1791 and 1800 to be the national capital, under the Residence Act and subsequent acts of Congress.