The short answer is that this happens when the system thinks, based on how long you've been editing the text (taken together with other factors), that you might be a bot.
Why would it think you might be a bot when clearly you're an established human user?
The system is designed to try to protect against harm caused by a user account that belongs to a real, non-malicious human but which has been hijacked and used for spamming or other bad acts. (For example, this could happen if your SSO password were discovered, or if some unpatched security vulnerability in Stack Exchange or your SSO provider were exploited.)
This does not, however, address specifically why you were presented with a CAPTCHA that particular time, and never before.
Here are some possibilities...
According to ChrisF, this can happen if the system thinks you've spend an unusually short or long time composing an answer:
Do you type up your answer in an editor and paste into the "Your
Answer" box? Or do you take ages typing, editing, revising and
reworking your answer?
If the time between you starting to type (er paste) and hitting the
"Post Your Answer" button is too short or too long (for different
values of "too") you will trigger the "are you a robot" question.
– ChrisF's answer to How can I avoid annoying CAPTCHAs when logged in? on MSE
That accords with my personal experience, though that answer is from several years ago and I'm not totally sure the system still works that way.
It seems this can at least happen you submit multiple edits very quickly. (I think "edits," in this context, includes the original submission of a post.) As balpha, a Stack Exchange developer, said the CAPTCHA-inducing rate limiting for edits is:
- 30 seconds for lower-rep users
- "10k users are only throttled to 10 seconds per edit"
Source: balpha's answer to I am not a robot! on MSE
And it seems there may be a bug in the system where if you log in after beginning to compose a post, and then not much time passes between then and when you submit the post, the system unnecessarily tries to check if you're a robot: