Directives update and input listeners execution order


I tested custom directives on Vue 2.6 in the sandbox and came across the following behavior that I did not understand: with direct input and with programmatic generation of the “input” event, the order of code execution is different. Why can this happen?

Here is some sample code from CodeSandbox.