The problem is that demand has variance, both temporally, and quantitatively. They don't sell exactly 12 pineapples each week. One week, they sell 9 and the next week they sell 15. And someone is having a fun Pacific Island-themed party and buys 12 in one day. So they generally used weighted averages coupled with seasonality to order, but even then, demand is not predictable. It's within a certain range, and they generally aim for the middle of that range when ordered. That's assuming infinite supply, which obviously isn't the case.
And no, AI isn't any better at it than humans, because AI is just trying to predict the behavior of humans, which is fundamentally chaotic and prone to variance.
And no, AI isn't any better at it than humans, because AI is just trying to predict the behavior of humans, which is fundamentally chaotic and prone to variance.