Why do you think Doordash/Shopify/Stripe "knew full well" that this boom wouldn't last?
The common thinking in SV and the world as a whole was that the pandemic accelerated the adoption of online services by about 5 years due to lockdowns and WFH. Unfortunately, the world reverted to the mean with regards to online shopping and ordering food pretty quickly in 2022, but this idea of accelerated-online was a reasonable one held by many.
Hell, if you looked at the numbers during those quarters at all these companies, the boards and shareholders would have fired the CEOs if they hadn't staffed up.