When it comes to specifying insulation, the type of product isn’t really an issue as far as the building codes are concerned. The codes don’t really care.
Go to any website that shows required insulation levels by Climate Zone, and you won’t find recommendations for foam over batts, or batts over cellulose. Instead, you’ll see target R-values. It’s the builder’s job to select the materials to hit that target, balancing budgets with preferences.