Hello Anon
1. It has a population of 2000 people but every year it's getting less.
The first "it" refers to something outside the sentence (a village, a prison, an ESL website – call it X), but the second "it" refers to "population".
However, there is a possible momentary confusion on the listener's/reader's part, if X is taken as the antecedent of the second "it" also.
Hence perhaps the apparent strangeness.
MrP