Have you noticed whether it's the same items running out, or does it seem random?
The frustration is real, and it's actually a combination of things rather than just one cause. Most cafes operate on pretty thin margins, so they're walking a tightrope between ordering enough stock and not wasting money on stuff that doesn't sell. If a seasonal item or specialty drink isn't moving as fast as they expected, they'll run out before the next delivery. Supply chain issues have definitely improved since the worst of 2020-2022, but they haven't disappeared entirely - some specialty ingredients or equipment still take longer to source than before. Plus, staffing shortages mean fewer people managing inventory, so things slip through the cracks more often.
The other part of this is just how cafes forecast demand. They're usually making educated guesses about what'll sell on any given day, and they're often wrong. If Tuesday's usually slow but suddenly you and fifty other people show up wanting the same thing, they're caught short. Some places deliberately keep limited stock of high-prep items (like specific pastries or made-to-order sandwiches) to minimize waste, so those items genuinely run out by mid-morning. If there's a particular cafe doing this constantly, it might be worth asking them directly how late their most popular items typically last - some will even hold things for you if you call ahead.