I don’t believe that’s true. Locking is entirely something done by carriers for promotionally-priced phones attached to active phone plans.
Can you point me to anywhere documenting your claim? That would definitely be a new low if true, but I really don’t think that’s how it works.
Sadly it is true. It’s called Flex Lock or US Carrier Flex Policy: https://www.usmobile.com/blog/what-is-flex-lock/
The gist is that it allows a third-party seller to stock a bunch of identical, not-yet-locked phones and offer a choice of carrier plans. The phone binds to whichever carrier the user first activated on.
So if you’re buying a phone, verify it is not one of these units.