Interest rates didn't increase in a single step. If the SVB had been forced to recognize their losses on a continuous MTM basis, then they'd have been forced to raise capital (or liquidate if they couldn't) by late 2022, when they were undercapitalized but not insolvent. The shareholders might still have been zeroed, but the depositors would have been fine.
In fact, the SVB designated those bonds as held-to-maturity, which allowed them to avoid reporting the loss, leaving them adequately capitalized for regulatory purposes despite being MTM insolvent. That accounting treatment doesn't change the actual economics though, so they still blew up.