Why should each row of cells in battery grid have equal number of cells for maximum power transfer?
IMO what your teacher actually meant to add was that all the cells are identical, so the internal resistance values are all the same and in parallel in any given row.
Under these condition if you removed (or added) a single cell in any given row, you change the matrix of internal resistances and move the maximum power point current flow.