If a hub site is deleted before it is disconnected from site collections that are associated too it, those sites may remain in the hub site association drop down when you go to use it later on. This can be confusing, for example if the deleted site was created again with the same name it will appear twice.
To clean up the drop down, fun the following cmdlets in powershell;
Connect-SPOService -Url https://tenantname-admin.sharepoint.com
#Review list of hub sites, orphaned url should show
Connect-PNPOnline -Url https://tenantname-admin.sharepoint.com
#Remove the orphaned url
Unregister-PnPHubSite -Site https://tenantname.sharepoint.com/sites/hubsitename
#Check the orphaned hub site has gone
After this, check the hub site association drop down and it should now be clear.