From the spec:
UAs must apply the 'overflow' property set on the root element to the viewport. When the root element is an HTML "HTML" element or an XHTML "html" element, and that element has an HTML "BODY" element or an XHTML "body" element as a child, user agents must instead apply the 'overflow' property from the first such child element to the viewport, if the value on the root element is 'visible'. The 'visible' value when used for the viewport must be interpreted as 'auto'. The element from which the value is propagated must have a used value for 'overflow' of 'visible'.
In short, setting a value for overflow
on just the body element causes that value to be transferred to the viewport, which in turn causes the body element itself to have overflow: visible
as the used value.
Changing overflow
on both html and body prevents the body element from losing its specified value, because then the viewport takes the value from the html element as opposed to the body element.