Gate agents often keep track of the number of passengers who board with carry-on bags that are too large to fit underneath their seats. Planes don't have enough overhead bin space to allow every passenger to bring a carry-on bag, so there has to be a cut-off at some point.