I used the create new plugin workflow to get the example plugin.
I make no changes, or load it into a project.
Now when I Plugins > Reload plugins
The example code is opened in the plugin editor.
Why is this?
If I duplicate an existing plugin from the command line, I don’t have this happen.
Opening the editor after you click the Reload plugins is just a “lucky guess” from studio. Studio opens the editor after the "Reload plugins"iff you have been editing plugin (you opened the plugin editor) from Plugin Editor window the Studio.
Most users would probably create the plugins with their favorite code editor; not with the Studio’s own editor. Studio’s editor could be handy for small changes in plugin code when you’re testing the plugin and fixing some minor issues in the code.
Anyway you can always just edit the plugin code outside Studio and click “Reload plugins”.