I never liked it because I like to go home without any nagging problems, and intentionally not think about work until the next day. It's not always possible, but I try to wrap up loose ends to the extent possible by the end of each day.
Leaving yourself a clear idea of what is next to do would be similarly effective IMHO. Finish the task you are on then open up the next task, maybe open up the right file in your editor then log off for the evening.
Yes, I just meant I like to leave work feeling like I've reached a "natural" stopping point. Something finished, or at least the path to finishing is clear.
What I dislike is when I'm stumped, puzzling over a bug or the correct implementation for a complicated feature. It's not always possible to resolve these situations by the end of the work day and they tend to nag at me through the evening. I don't like that and try to avoid it, rather than deliberately create this feeling ("leave things undone") as some sort of trick for motivation.
Personally I try to finish a feature, but leave QA for the morning. This way my first task is “copy and paste this command into terminal” or “use X feature in the app.” Because there’s always something that needs tweaking before it’s really done, this naturally pulls me into flow the next day. It’s a great trick!