The padrón is the list of people resident in the town, however, for many years town halls have been encouraging all property owners to register, many of them offering a discount on local taxes to those who do so. The towns get a substantial subsidy from central government for each person registered which is a considerable help towards paying for local services. There has been considered publicity recently that the number of foreigners on the padrón is falling.
Until a few years ago once registered it was practically impossible for a town hall to remove anyone. The law then changed, now true residents must re-register every five years, other owners every three years. Many do not realise this or, having registered once, do not want to make the effort to do so again. There is also a possible tightening-up of the law which says only residents can register and that it is the responsibility for the person registering not to do so if they are not resident, not the town hall.
As I said, no mystery.