Generally, agencies are required to maximize competition for procurements. But there are exceptions to this rule, such as for simplified acquisitions. Another exception is for sole source bridge contracts awarded between the end of an incumbent contract and the start of a new contract.
A recent GAO case explains the rationale for why a sole-source award is usually acceptable in that situation.