Then why does it need your credit info ????
I'm confused...so when you enter "buy" is it still free??
If it has 'get' instead of a price button then it's free to download - my iPad (iOS 10.2) does the same, it has 'cancel' and 'buy' on the password popup.
Is this a new account ? If it is, did you not use these instructions when creating it : Create or use your Apple ID without a payment method - Apple Support ? If you don't use those instructions you will be prompted to enter payment details before the account can be used, but you are not charged (expect temporarily to check that the card details are correct and valid) for downloading a free app
As long as the app is free to download (i.e. it has 'get' instead of a price button) yes, you will be buying it for nothing and it will be added to the account's purchase history.
Why does it say buy when it's free in app store?