If I bought an iPhone from an Apple Store, does it come automatically unlocked?

So I bought this iPhone 6S plus from a Boston Apple Store two years ago. I have been only using it with a T-Mobile SIM card. Now I want to either sell it or give it to my mom (who lives in Canada) to use. My question is, since I bought it from an Apple Store, did it come unlocked, OR, since I used a T-Mobile SIM card with it that it is now locked to T-Mobile?