Brief Summary
Autofill one-time SMS passcodes sent to iMessage similarly to how Safari does that.
Details:
Basically, nothing special. In the screenshot below I show an example of how this feature works at google.com using Safari. I have iMessage synced on my Macbook. Afaik that is pretty old feature.
Image/Video: