It is necessary if you don't want to have random crashes.
For example in the edited example the Forbid() call is absolutely needed (and without matching Permit() call, even).
If there was no Forbid() the quit flag would be set to 1, and then if rescheduling would occur the main program would get to run. When the main program finishes, the shell/Workbench will free the seglist. Now imagine if the sub process would then get scheduled to run. The memory holding the seglist would be free and something else might have reused it already -> crash.
Normally Forbid() call must have a matching Permit() call, but end of process is special case, here you can do Forbid() and let process end handle it (evetually RemTask(NULL) takes care of the pending Forbid).
If you are performing operations from multiple processes, or you're scanning system lists you need to have arbitration. System lists require use of Forbid()/Permit(). Your own stuff can potentially use semaphores.