This issue is related to the following support post:
https://wordpress.org/support/topic/force-set-primary-category-for-woocommerce-products/#post-10100325
This is also related to the following issues:
https://github.com/Yoast/wordpress-seo/issues/9310
https://github.com/Yoast/wordpress-seo/issues/8472
Description of what happened
Third party addons such as ‘Woocommerce import suite’ and ‘WP All Import’ allow the bulk importing of products into a Woocommerce Website from a CSV file. When products are imported using this process the Yoast SEO primary category flag is not set.
As an example if we import a 'Las Vegas Hotel' Woocommerce product with categories set to 'Hotels' and 'East Las Vegas', then the resulting categories on the Woocommerce Product page appears with no primary category set as in the screenshot below:

As a second example if we import a 'Las Vegas Hotel' Woocommerce product with just the single category set to 'East Las Vegas' then on the Woocommerce Product page the Categories appear with no primary category set as in the screenshot below:

What we expected to happen and why
In the first example we would expect Yoast SEO to set the 'East Las Vegas' Category as the Primary Category as in the screenshot below:

In the second example where 'East Las Vegas' is the only Category, we would expect Yoast SEO to also set the 'East Las Vegas' Category as the Primary Category as in the mock-up screenshot below:

How can we reproduce this behavior?

Thank you for opening a feature request.
I've labeled this issue needs decision which means our product managers will assess your request.
Thank you Ben, currently I've had to set the primary category manually which takes many hours with a few hundred products and is not practical if there were thousands of products.
+1 on this!
Hi, Any news on this Feature, it's been 7 months since I first suggested this? Thanks
+1 on This!!
I'm importing 7457 products with 2 catagories each...... I REALLY need this feature...
no make it +100 ;)
I would also love to have the option to set a primary category in bulk on the products-admin page. Right now I can only select to add multiple categories for multiple products, but I cant set a primary category for my selection.
+1 !
Hello all, since we are not hearing back from Yoast I thought I'd share some findings...
Using WP All Import I noticed our required custom field: _yoast_wpseo_primary_product_cat
Hope this helps!
I'm sure that's new, wish they'd updated us, but great news if its what we were looking for!
As it seems that this issue was resolved by exporting and importing the right settings I will be closing this thread. Please keep in mind that by using third party plugins to export and import our data you rely on that plugins' logic to export all needed data. If some needed data is not available for import, it probably is because it was not exported in the first place.
@Djennez I agree that the issue can be solved by importing the right fields, however, you should add this to the documentation or request the Woocommerce team to introduce this to their documentation when bulk importing of products.
Most helpful comment
Hello all, since we are not hearing back from Yoast I thought I'd share some findings...
Using WP All Import I noticed our required custom field:
_yoast_wpseo_primary_product_catHope this helps!