The idea
A floated child escapes its parent, and the parent collapses to zero height. display: flow-root gives the parent a new block formatting context, which makes it wrap the float and regain its height.
overflow is off-limits: overflow: hidden would also contain the float without teaching you flow-root.