The advantage of doing it would be to be able to load it programmatically more easily. Using defer is indeed sufficient to improve the performance of the first page load, but it still means that the index is loaded even if the user never begins a search, which can be unnecessary.
Loading after clicking on the search bar can still be done with the current setup, as shown here with the following, but it’s quite cumbersome.
And even then you need more code to wait for the JS to be loaded before actually performing the search. Having a .JSON file would allow simply loading it with fetch and use a global promise with with the result.
Finally, I haven’t personally had the issue but it seems that the JS files for all languages store the index in window.searchIndex. This seems like it would prevent someone from having the indexes of multiple languages loaded at the same time. Having multiple JSON files instead would make it easy to load them in different places.
I’ll take a stab at making a PR adding a field to the config to generate search_index.<lang>.json