Animals exhibit territorial behavior for various reasons, including protecting their resources such as food, shelter, and mates, establishing breeding territories, ensuring the survival of their offspring, and defending against potential threats or competition from other individuals of the same or different species. Territory marking also helps in establishing and maintaining social hierarchies within a population.