I think this is actually because esbuild doesn’t support everything needed in their production bundle (well controlled/grouped bundles) while it’s excellent for dev where there’s no such need.
I can’t remember where I read it, I think it’s in the official docs.