I have been an AT&T customer for many years, but not with my Pixel XL, it's with Project Fi. It doesn't matter if you move your AT&T SIM card from an AT&T branded phone to a Pixel, or if you get a new nano SIM card from AT&T for your Pixel, the results will be the same. You will have brought your own phone to AT&T, and that's fine with AT&T, but the rule is that the phone you bring to AT&T will not be permitted to have certain features enabled, such as WiFi Calling and HD Voice. It's called leverage... a carrot dangled to encourage potential customers and/or current customers to opt for an AT&T branded phone and remain with AT&T long-term, rather than using an unlocked phone and maybe moving on, etc.
If you are using an AT&T branded Samsung phone, and the phone is paid off, you can certainly get the phone SIM unlocked and move it to another carrier... however, the only way that phone will ever be updated is OTA, via the AT&T network, with an active AT&T SIM card installed. So, when you move that AT&T branded phone to another carrier, you can most likely kiss any future updates goodbye. More leverage.