Which backups does Time Machine keep or delete? I know Time Machine promises to keep one backup per hour for the past 24 hours, a daily backup for the past month and a backup per week beyond that. What I’m wondering is: if you’ve connected an external Time Machine drive multiple times on a given day, which of those backups gets kept and which ones get deleted?

I had always assumed Time Machine would keep the last backup of a day (and similarly, the last backup of a week), but that doesn’t seem to be true: I made two backups last Sunday and wanted to get a file back from the second one, but found that only the first one is still on the drive. Some digging through the Console logs shows that Time Machine deleted the second Sunday backup yesterday.

Does Time Machine perhaps simply keep the first, rather than last, backup of a day? Or does it use another criterion to decide which backup to keep, for example the smallest or biggest backup of the day?
For hourly backups Timemachine does indeed only keep the "first" backup of the day. This  is a "Daily" backup.

Backups are automatically deleted after a backup is performed and the storage of old backups is set according to this schedule.

Daily backups are deleted after a month except for the first of each week which is a "weekly" backup.

Weekly backups are deleted as space is required, then one or more of the oldest "Weeklies" will be deleted.