He told me he loved me the night before we broke up

We both knew we weren’t working out.. but I hate that he told me he loved me the night before..why do they do that?