Face to face vs. Online Learning

As an educator and a student, I always believed that face to face or instructor led courses were more valuable and conducive to learning. Online lacks community building and also its very easy to tune out when not engaged by an instructor directly. This view has been recently challenged. A course project that I just finished grading that was delivered face to face in one section and synchronously online in another led to this.  The students who attended class physically averaged an 86 on the project, where the online students averaged a 94. Why the disparity? Does it have to do with motivation? These are undergrad students, but it seems the online ones paid closer attention to guidelines and put more effort into their projects. Maybe it has to do with age. The live students are in early 20′s mostly, while the online ones are a hodge podge of 20′s and 30′s. I may be reading too much into this, but when I know the instruction was the same and in some respects more thorough with live students, I am left to guess as to why the disparity. Any thoughts?