Only now I finally understood why piano tuning is so difficult - and the reason is actually quite understandably in the inharmonicity of the plucked strings. This mostly stems from the fact that the diameter of real strings is not small enough compared to its length, and therefore higher harmonics are not perfect multiples of the base frequency due to the additional bending resistance for higher frequencies.
During tuning therefore octaves have to be stretched following the
Railsback curve to avoid that overtones of lower keys ‘beat’ against the fundamental tone of higher keys. So tuning is actually a compromise differing from the tempered tuning scale.
Nicely described in the Wikipedia article Piano Acoustics.