Walls are typically built for the purpose of keeping something out or keeping something contained.
Pick which sentence is not logical.

1: "the city wall was built to defend against enemy"
2: "the city wall was built only for beauty"