Organizations might not have the ability or money to hire an entire organization to build a product from scratch.
An upfront $200,000,000 bill is much harder to budget for than a 7-8 year $25,000,000 bill at an organization generating around $1 billion in revenue and with extremely low margins.
For most organizations, software is a cost center the same way HR, Payroll, and Accounting is within tech companies, so whatever limited money exists is better spent on their primary mission
Contracting out functions can work quite well, but the issue is organizations might not hire the right kind of management staff for techncial projects. Also, in most organizations IT/Infra falls under the CFO organization, and as such budgets are much smaller
Also, procurement rules are often written in such a way that it's often unfeasible for newer alternatives to compete simply because there is a massive upfront cost to meet RFP requirements.
Contrary to popular belief, enterprise sales doesn't want to target high revenue alone, you want to target high revenue PER dollar spent. If I made an efficient competitor to Cerner or Epic, why should I spend $50-60mil over 3 years to get FedRAMP qualified if the TAM federal agencies can provide me is maybe $100mil? For Cerner/Oracle and Epic, that $50-60mil isn't that expensive to provision because it can add additional lock-in or deal sweetners like other adjacent softwares or services getting discounted, thus making that $100mil into $130-150mil, or leveraging economies of scale to make that $50-60mil infra cost down to $20-30mil.