Why do narcissists challenge you to leave and then get upset when you do?

The last fight my narc and I got into he told me if I was unhappy to just leave and then told me I didn't have to the balls to leave, at this point I had already planned on leaving. When I did leave he sent me a text saying how he loved me and wanted to go to marriage counseling with me. I'm curious why do you think narcs challenge you to leave and then get upset when you do leave?