It turns out that the behaviour, expressed in my question, happens when you have more than 1 instance of notepad open.
I had started 2 instances of notepad, each with their own sessions/tabs in them. But when I just had 1 instance of notepad open, with sessions/tabs, it allowed me to close it without prompting to save.