Why does Google Sheets Upsert function sporadically show an error about exceeding cell limit when the sheet doesn't have near 10,000,000 cells?

Posted thread to Discourse: Why does Google Sheets Upsert function occasionally error out, claiming cell limit exceeded despite significantly less cells used?