Having been on both sides, it often makes a lot of sense. A lot of companies have surprises requirements in contacts, such as HIPPA or military/classified or whatnot. The cost of adding a new vendor can be astronomical compared to the cost of dealing with CodeCommit.
In truth, though, Amazon should have bought gitlab instead.