What is the serial monitor actually doing?

PearlRock:
I am guessing you are referring to status registers?

No, I believe PaulS is referring to the fact that in the real world there will be a significant delay between sending a message out, and having the response available to you. Your sketch makes no allowance for that and assumes that the response will be available instantly.