It is the separation between presentation (GUI) and actual compute.
The latter should always be done to keep everything OK. The former is less interesting. You can mitigate that by calling update just before you close.
What you see is not always what you get if you do not understand that difference.