Am i missing something?
Yeah, you're missing what happens in that case (which actually happens quite a bit).
The red plane says "this part of the line is inside" and the green plane says "this part of the line is inside" and as you can see, there is no overlap between those two parts (the arrows point away from each other). So when you get to the end of the routine, the check for
startFraction < endFraction will fail.
That's why you can just work with infinite planes instead of finite faces: effectively all the planes get clipped by all the other planes. Dunno if that's enough explanation...does it make sense to you?
Edit: I should probably say that what you're doing is clipping the line against each plane (half-space), keeping only the part which is on the "inner" side. If there's none of the line left, then it doesn't intersect the brush. So the
if statement you mentioned in your OP is an optimization, an early exit. It's not the only way for the line to be outside the brush.