Drupal Commerce: Allow anonymous users to choose password
You should look into modules that handle this use case. See below for examples:

https://www.drupal.org/project/commerce_checkout_complete_registration

https://www.drupal.org/project/commerce_checkout_redirect

https://www.drupal.org/project/commerce_login_step

https://www.drupal.org/project/commerce_extra