Selection is an action that occurs at a point in time. Once that action is complete, there is nothing to stop you (or a program) from modifying the database so that data that doesn’t match the selection formula becomes visible.
In this case, your first line of code does the selection, so there will be only two visible records at that point. The next statement, group, adds two records to the database, as Dave described. These new records have nothing to do with the selection, since they were created after the selection was performed. So you wind up with two data records that were selected, and two new summary records that were created by the group statement. The group statement will always create at least two records, a level one summary and a grand total summary. Of course usually it will create more than one level one summary, but in this case it didn’t because you only had one name selected.