The w3-clear class makes a parent element contain its floated children.
Compare the red borders around the same floating boxes.
Only the second parent includes w3-clear.
The second parent border extends around both floating boxes.