I've seen multiple websites with only one field for the password during registration, whereas there are two fields – Enter Password and Confirm Password – for password reset and update tasks.
Nowadays it's becoming more common to allow users to see their password, using the little eye icon for example. This would remove the need to enter it twice.
We're not really in the internet cafe area anymore where there could be a dodgy person lurking behind you to steal your password at any time.
Humans tend to make mistakes every now and then. But that shouldn't stop an user from signing into a particular website or app. Maybe the slightest of mistakes such as accidentally turning on the caps lock while typing in your password can get you denied from logging into that website again. So adding one more text field to double check on your password is always better than users having to reset their passwords to log in, every time they make a mistake.