That's fine. Snaps can be sandboxed*. That works fine when an app can work in a sandbox. For example, a simple game would work fine in a sandbox.
But... VS Code wouldn't really work in a sandbox. It's a code editor, so it can edit any file, and it has a built-in terminal as well. As a result, it doesn't really work in a sandbox. So, Snap gives you a warning that it won't run in a sandbox. If you're fine with that, you can just say yes.
More generally, you'll get that message when an app won't work in a sandbox. Some common types of apps that won't work in a sandbox are apps like terminal emulators and code editors, as they need full system access.
*Whether or not the sandbox works well/is secure is a separate question
The OP also asked why it doesn't ask with the --classic
argument. Let's look at the manpage for the snap
command*:
--classic
Put snap in classic mode and disable security confinement
So, because the --classic
argument disable security confinement (a.k.a. the sandbox), snap
doesn't prompt you because you've already specified that you want to disable it.
*You may notice that I linked to the Debian manpage, not the Ubuntu one. It doesn't make a difference, but the Debian one lets me link to the specific argument I want, and Ubuntu is based on Debian, so linking to the Debian manpage is fine.