Because Apple messed up on several iPhone 7. We have a tiny handful of reports of the Sim free version locking to ATT. This can only happen if they weren’t listed on Apple servers as unlocked.
Contact Apple as they essentially sold you a defective phone. Include receipt.
(The following is included after all posts to save typing) We are fellow customers. Our answers are based on experience and reading content available on the website. Our answers are honest, but not always appreciated. If you posted personal information, please edit and remove.