In the 16th century, a strong city wall now almost completely destroyed protected the population.
The city wall protected the city.
In order to have a pleasant trip in Malaysia, you might need to set your priorities.