I'm having trouble understanding the construct of this sentence.
"Pourquoi l'ont-ils construite aussi grande ?"
How is it different in meaning from this?
"Pourquoi ont-ils construit une aussi grande ville ?"
Considering in your first sentence,
l' refers to a city, it can be rephrased to
Pourquoi ont-ils construit cette ville aussi grande ?.
l' is a pronoun that replaces the noun
The difference in meaning with the second sentence is very tiny.
Depending on the context, there might be a nuance, the second one might be a more general question, sort of
Is it useful to build such a big city, in general?, while the first one might be more specific, sort of
Is it useful for this city in particular to be so big?. But I bet in most cases, both sentences will be actually equivalent.
Note: the question is not specific to French language, actually. The same one would apply in English between
Why did they build it so big? /
Why did they build this city so big? and
Why did they build such a big city?