This is a common manufacturing feature. Main reason is to end the threaded section with properly manufactured and grooved threads. It will also in use facilitate and define the nut's stop and return travel start.
I do not think tooling machines actually need this form to form threads properly, but assume experience has found this to be a good working solution.