Yes. This helps us make sure no one is trying to access your account without your consent.
If you're using a trusted device, like a personal computer or phone, you can choose to "remember your device" during the login process. This way, you won't have to enter a code each time you log in.