It is a nice idea to let the user register him from the Checkout Page at the same time during the process of purchasing the products.
Allowing the user to register and create an account right from the Checkout Page gives flexibility and reduces the user's efforts to create the account separately.
So, to accept the User's username & password from the Checkout Page, WooCommerce adds the two extra account fields depending on the setting that you have made in the WooCommerce -> Settings -> Account & Privacy Tab -> Account Creation Section.
There are various options using which you can manage the display of the account creation fields.
WooCommerce has an easy to understand and in-depth documentation for those setting which can be found in this article. [ Link here ]
Also here is a video which will give you the step-by-step visual guide: