I can see the delay when I remove my terminal from the DevTools permission in Security preferences.
So it's real.
However, scripts are NOT notarised, so what is it doing?
EDIT:
So after digging the scripts are being "checked" for malware, as part of XProtect.
This is interesting, it seems to be hashing scripts and testing to see if its known malware.
Anyway, easy to disable, but weird stuff.