The behavior of block formatting contexts next to floats is not fully specified. From CSS2.1 (emphasis added):
The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap the margin box of any floats in the same block formatting context as the element itself. If necessary, implementations should clear the said element by placing it below any preceding floats, but may place it adjacent to such floats if there is sufficient space. They may even make the border box of said element narrower than defined by section 10.3.3. CSS2 does not define when a UA may put said element next to the float or by how much said element may become narrower.
So the (unsatisfying) answer is effectively "that's just how browsers behave". This means that layouts that rely on the "shrink to fit" behavior -- the effect produced by wrapping the input in a span, in the question's example -- are relying on unspecified browser behavior. From the point of view of the spec, browsers could just as well always clear the block formatting context below the float.
It appears there's been some activity to better specify this corner of CSS for CSS3, but I haven't found anything authoritative.