In both cases, we were providing services to a single product group within a company large enough that those product groups can act nearly autonomously. And in both cases, the corporate office came to the (quite rational) decision that having ten product groups using ten different agencies was inefficient. In one case, corp's pet agency became the agency of record; in the other case, they actually built an in-house department from scratch and stopped using agencies altogether.
If there's a moral to this story, it's to scale that ladder. If your product/service/whatever only has one customer within a large organization, your use is vulnerable to consolidation moves. But, if your one user is happy and satisfied, you can often use that to gain wider traction within a company. In addition to more customers, it's a much safer position to be in when someone from on high wants to start standardizing across the organization.