IIRC, [a long time ago?] you MUST give a piece of paper to a guy/gal near the exit, so they remember to mark your exit in the database. I don't think they check too much, just collect the pieces of papers? (I don't remember the details, but if there was a scary warning if you forget to give it and they forget to update the database.)

This is part of the Canadian border control in my experience; i.e.

- Arrive in Pearson

- go to passport control, scan passport at kiosk, kiosk spits out receipt

- you flash receipt to a border officer at the stairs out of passport control

- go to baggage claim

- get bags

- go to customs

- hand passport with receipt to officer at customs

- welcome to Canada

I haven't had that experience when leaving other countries bound for the US; like GP said, I've had to show my passport to the airline to board, but I believe that's to fulfill the requirement that they made good-faith effort to ensure I'm capable of entering the US.