The obvious advantage is that the generated plugin can be installed and tested right away.
I use AI to generate simple site-specific plugins, to avoid having to install a bloated plugin that has a ton of unneeded features and keeps telling me to buy the premium version. Here are some example functionalities I implemented with AI-made plugins:
I've made at least a dozen different plugins that I actually use on live sites. Before this plugin, I used my custom GPT to generate plugins (it's called WP Plugin Architect GPT), and before that, I simply used ChatGPT to generate them.