OS Locked on AT&T? Please explain

So I'm looking into getting a new phone. I have an S3 right now with CM (love the OS, phone is meh), and in my search for what I ought to get I'm learning that some carriers have locked their shite OS on the phone. I was looking at the Galaxy S5, Galaxy Note 4, and LG G3, all on AT&T. Could somebody please explain how they do this, and perhaps why they do as well. Are we going to see a CM workaround some time soon?

These locks are usually accomplished by using by writing in restricted privileges into the bootloader (specifically denying the ability to unlock the bootloader). Usually they block the ability to unlock bootloaders for several reasons: kickbacks, to keep you from uninstalling their services that compete with Google services, and to protect "their" radio from being reprogrammed to be used on a different carrier.

If you want to load custom Roms I would stick with nexus, Motorola, and the one plus phones.

Agreed with Motorola and One Plus, however hard they may be to get a hold of. I currently have a 2013 Moto X, and the thing is super easy to root as I've done multiple times in the past for various projects and things. As someone who works in the industry of smartphone activation, repair, and sale, I can say that AT&T doesn't do too much more to lock down their phones than any other carrier. You could always purchase an unlocked phone at full price to have a completely untied device that is truly 'yours', or if the carrier lock is an issue, you could by it full price, then have it unlocked by AT&T here.

Buying it for the full price otherwise known as 'outright' will also save you money since your Line Access Fee will be lower if you're on a newer Mobile Share Plan.