why do we need a key pair while creating an EC2 Instance?

Key Pair can be used to authenticate ec2-user in both windows and linux with .pem file.

why do we need a key pair while creating an EC2 Instance?