Madrid becomes the Spanish capital in 1561, and this implies the institution of the the “regalia de aposento”, making mandatory for citizens to provide half their own homes to provide shelter for Royal officials. It seems that municipal authorities agreed with the King this provision in exchange for the benefits of becoming the permanent capital of the country. This fee was established in the middle ages, when the court was moving from city to city, and it was a transitory problem for citizens, but by making Madrid the permanent capital this became a nuisance that influenced architecture.
Every home was subject to the mandate, but some had dimensions or arrangements that complicated divisions. As a result, citizens decided often to build homes that could evade partition, and this led to the name of “malice houses”. Anyway, these homes were subject to a monetary fee, so there was first a need to institute a tax raising office, and later to create, in the 1749-1759 period, the first city cadaster.
You can consult on the internet a full compendium of the legal texts on the issue… from 1738. As often in past texts, it is quite interesting to read the description of the kind of royal officials that had a right to shelter…
A translation of the specific text on the malice homes (page 28 on the electronic text) would be:
“in any home that can be easily divided in two parts, and that is in this city of Madrid, where the Royal court is, the half belongs to its Majesty as a result of the shelter rights… , and those that cannot be divided as they have just one room, an appraisal of their product must be made, and the owner will contribute with a third of it to the shelter rights, leaving to the owner the spaces from a third to a half, that he should give; and those homes are called of difficult partition, of third part, or malice”.
So evading a fee did led for a long time to an architectural production in Madrid that was defined by one level, one-room homes. Sometimes there were rooms on an upper level that was not visible from the street, and in some cases the homes were deemed indivisible due to their internal divisions. As a conclusion, neighbors preferred a bad architecture to a fee on their privacy.