A mixture of common sense and common law. The laws setting out the rights and obligations of support to flats above/below in flatted properties descend directly from Roman law.
... A wall built equally on both sides of a boundary is owned up to the medium filum, or middle line, by each of the adjoining proprietors. Each has a common interest in the wall as a whole. This was held to be the law in the Outer House decision in Thom v Hetherington. This decision confirmed two sheriff court decisions to the same effect in Gray v Macleod and Gill v Mitchell.[1] The rule adopted in these cases is the same as the well-established rule for common gables. The effect is that each owner can use his part of the wall as he pleases, provided that he does not adversely affect the common interest in the wall as a whole. Common interest imposes both a restraint and a positive obligation. The restraint is that each owner must take care not to disturb the stability of the wall as a whole. The positive obligation is that each must maintain his own part of the wall. ... The existing law seems to us to as a matter of legal policy to be both clear and sensible. It does not cause any injustice. It provides for maintenance of a boundary wall as a whole while at the same time allowing each owner to make full use of his own section of the wall. The rules of common interest afford sufficient protection to an owner who thinks that his neighbour is using the wall in such a way as to jeopardise its stability and structure. (Scot Law Com No 163)
[1] Thom v Hetherington, 1988 SLT 724. Gray v Macleod, 1979 SLT (Sh Ct) 17. Gill v Mitchell, 1980 SLT (Sh Ct) 48.Owain