Without an emergency fund, any unexpected expense forces a bad decision — selling investments at the worst time, carrying high-interest debt, or raiding retirement accounts with tax consequences. The emergency fund prevents all of those outcomes.
It also changes how you invest. An investor with three months of expenses in cash can hold a more aggressive portfolio, because they know they'll never be forced to sell equities to pay a car repair bill.
The right size depends on job stability, fixed expenses, insurance coverage, and family situation. There is no single right answer — but there's a framework for finding yours.