I guess it depends. Is the phone "discounted" if you do this? For a while, committing to a yearly plan meant that you got a phone for the price of a phone plan. The alternative is paying for your phone, and just change service anytime.
This sucks however when you are traveling abroad. If your plan doesn't have roaming at your destination, you can't use a local or travel SIM/eSIM. For some people this seems to work fine.
I never owned a sim-locked phone and never will.
Funfact: sim-locking is the standard in Japan. And if you think you have it bad in america, you really need to take a look at the things they do in Japan. They have two-way SIM locking: you can't even use your current SIM on an unlocked phone!!! You HAVE to buy the phone FROM the phone company or else it won't work. Or you can get a SIM that will work with unlocked phones, but they won't sell you a phone (not even sim-locked) if you do this. Are you a foreigner? no sorry, we won't sell you service because you're a flight risk. "We have been having cases of foreigners leaving the country with unpaid bills. yes, we know you are a legan resident and you need a phone to function in society nowadays but you know, the risk of you not paying us 1 month of is far greater than whatever money we can make off you".