In Italy (and, I think Switzerland?) the police even visit you apartment, to make sure that it is big enough for the number of people who are supposed to be staying there.
For the local administration the register of residents is mainly important because German communes get money per inhabitant. Thus there was recently a place in North-Rhine-Westphalia where one did not de-register the local dead. ;-) At a time when the crime of procuration had been abolished in Germany I recall seeing a Swiss policeman on TV checking the bedding for proof that it had been warmed by two.
German communes get money per inhabitant.