Word processor styles are like declarations of a variable in source code: They allow you to save effort by doing work once instead of repeating it each time that you need it.
As the Scilab code is put into the exec function, the exit command is concatenated to the end of it so you don't have to rely on the user to input the word exit each time.