Why were wars fought over Jerusalem?

Jerusalem is a holy city for Jews, Christians, and Muslims. From time to time one or another of these groups have controlled it, which precipitated the wars between Jerusalem's rulers and others who wanted to control this city.