This was done for rational reasons (partly US population density, zoning issues) but, I think, the mistake was motivated largely by going into third-party in the way they did, which necessitated tall and narrow distribution. And I think it is going to be difficult to make that space economic if third-party softens (imo, inevitable because they went for a free-for-all, which can only devalue your brand over enough time).
Maybe, the position in the US is defensible. Outside the US, particularly in Europe, I think it is unrecoverable (this is partly my biased experience, AMZN has one of their largest warehouses globally near me, and the economics make zero sense given population density). So I think you will see companies that already have very tall and narrow distribution in some verticals compete within third-party (I am seeing this locally, apparel retailers suddenly becoming platforms), and then the short and wide distributors will cut them to pieces with less SKUs/faster delivery/more control over products (if you look WMT, their failure online is unbelievable...they probably had better infrastructure than AMZN until very recently, and maybe still have an advantage because of their locations).
EDIT: I will add, this is measurable in terms of a rather standard retail metric: sales per sqft of warehouse space (inc. system/third-party sales). Right now, I think they are in a self-reinforcing cycle but if this softens, all the strengths become weaknesses (again, quite like standard retail). But if you see sales per sqft keep trending up for the next five years then I am wrong.
Could you elaborate?
What mistakes did they do in distribution?
I am just seeing them out-compete everyone. With their own dedicated shipping they can grab that essential percentage point of margins that makes them either rich or gives them the ability to be the best price in town.