I'm not a bike shop guy, but my understanding is pretty much what you describe. Particularly for the bigger brands, they're going to lock in dealers to carrying their brands & not a lot of competitors. However, some of the smaller brands can be ordered by any bike shop through 3rd party distributors. For example, there are a couple brands carried by QBP, but they don't have Specialized, Trek, Bianchi, etc.
Generally a bike manufacturer will have specific dealers to sell their products retail. These dealers will likely have a protected territory where no other dealer of that brand will be located. If a bike shop is not a dealer for a given brand, then they cannot order one of those bikes from the manufacturer.