Temples may have led to cities and then agriculture, and not the other way around.
Makes sense. LDS build a temple and the housing costs in the area skyrocket….
You could build a temple in the middle of the nowhere, and within a year would have a community of faithful LDS living around it.
See, e.g., Snowflake, AZ.