Why does finalizing block happen before updating canister state that?

Why does finalizing block happen before updating canister state that ? Why is 4 before 6?


What if the execution of canister failed? Will it roll back the state?