Unsaved work should be a concern of the app, not the OS. The app should obey the commands of the OS, and handle auto-saving on its own to keep fulfilling its duties to the user.
Apps that let you risk losing work -- from not just shutdowns but crashes and power outages - are the ones I don't tolerate. It's one of the reason I use Sublime Text for taking notes for example.