Usually such buildings were temples. Having a beautiful temple in the city could have the function of unifying the population: this is where the people could go and unite and where their leaders would be. It could could also give them a sense of common identity.