It is possible this practice has stopped with eTA but previously whenever I boarded a plane to Canada there were people with laptops checking the paperwork of people in the queue. Who were these people? Was this just security or some sort of pre-filtering for immigration?
Both airlines and airports can add extra levels of security to departures. These are often in response to changes in threat levels (which may or may not have been made public).
In some places these extra security checks are preformed by contracted security firms, sometimes by airport security, sometimes by government security.
I have had flights were I encountered pre-check-in security doing Q&A (who, where, why) followed by pre-boarding security doing bag inspections.