exitWith exits the execution of a context, which doesnt mean it will exit a script. A context is defined, for example, by while loops, for loops, if blocks, etc. To simplify, if you have code between {}, then you have a context.
while {true} do
{
...
if (!alive player) exitWith {}
...
};
// Previous exitWith will jump here (out of the while context).
// This exitWith will effectively end the script as it is in the top most context level.
if (!alive player) exitWith {}