Can somebody explain how the IDE's file-QUIT is supposed to work?
Sometimes file-QUIT asks "do you want to save changes?", and sometimes the IDE just closes including all changes made. I only have one sketch open and often I'd like to close the file without changes.
File > Quit should always ask whether you want to save if the sketch has been modified since it was last saved.
Do you have "Save when verifying or uploading" checked in yourFile > Preferences? If so, your sketch might be getting saved without you noticing.
When the sketch has been modified since the last save, you will see a "ยง" on the sketch file tab. If you do a File > Quit when that symbol is shown and it doesn't prompt you to save, that is definitely a bug.
It's the default, which I guess is yet another way the Arduino assists noobs.
It caught me up badly a few times. I am accustomed to being able to mess around and the close without saving. I use "Save As..." quit a bit too, Apple now sorta hides that - you have to use the Option key to get it, something it took me some time to bother looking for, finally it just got too annoying.
Sometimes progress is. Progress. Sometimes things that have been perfectly clear to millions of users for decades, literally, gets "improved". Not.