Task B has a bunch of logic, and there’s the potential for something to go wrong. Sometimes something goes so wrong that you want to discard the task and any parent that called it.
Think of it like throwing an exception in a general-purpose programming language.
NOTE: Do note that it is usually only for the use of developers and not end users.
If you want to achieve this behavior for a user, then we will have to manipulate it with the dialog flow. We may create a separate dialog with script to clear/delete context and prompt user to start a fresh conversation and map it to Task execution failure event.