"they" here refers to the people of Judah.
"built for their own use"
"on the high hills and under the green trees"