Hi Christopher. It happens due to:
“You can see how
timeout finished is written at the end, because the script itself is treated as a macrotask so that at the end the enqueued microtasks are executed, that is, the two console.log referring to the callbacks of the promises.”
So the script itself is a macrotask (with the Promises as its microtasks) and the
setTimeout other different macrotask.
I hope I solve your question :)