Packer opens port 22 while creating AMI

Hi,

I want to understand why packer open port 22 while creating the AMI image.
Is there a way by which we should not open port 22 and create the AMI.

Thanks