Immigration does not routinely collect information from the airlines.
I suspect than when the TM.6 requirement for air passengers was abolished, someone forgot to delete the requirement for immigration officials at the airports to input the flight number on their computer screen, hence the I/O's request for the boarding pass.