If you do a static export, you don’t have a server to optimize images. It’s just a bunch of static files. The only way to optimize the image is to point to a service through the loader.
Also, the image optimization on the default Next.js server, for example deployed to a $4 VPS, also works without Vercel.