Why can't all rooted phones be unlocked? I enjoy modding my phone with custom roms, kernel patches, and custom bootloaders.

I know that the bootloader/recovery can be overwritten, as can pretty much any partition that exists on the phone. Even the radio can be flashed, though this is not generally an option available since you could permanently brick a phone that way.

My question is how phone companies can lock down a phone (ie tie it to their carrier) if a rooted phone gets access to basically everything? I lack the knowledge in the architecture of how a locked phone works, so I'm guessing there has to be some chip that is not accessible.

Can someone shed some light as to how exactly a phone gets locked?
Most phones have separate AP (application processor) and BP (baseband processor AKA modem AKA radio). "Rooting" results in gaining control over the AP. The carrier "subsidy" lock is residing in BP. Most custom ROMs just include stock (i.e. still locked) BP image as a binary BLOB. Since the BP code is proprietary and never gets released to public.