It’s definitely not luck! For better or for worse, econ PhD admissions compensate those who realized they wanted to do academia early. These people took the right classes (Real Analysis, linear algebra, advanced micro,…), started talking with professors early, took care of their GPA and avoided super hard classes where is difficult to do well (phd micro). In other words, they knew how to play the "game". They picked up stata early and was easier for them to find a great predoc.
That being said, conditional of having a good GPA, I think the consensus is that LORs are the most important factor. That is why predocs, for most people, are better than paying 30k to do a masters at LSE. But not all predocs are created equal, the professors need to be somewhat recognized in their field and, more importantly, need to have recommended students in the past.
That being said, if you were rejected by Michigan, don’t lose hope! This is one of the first offers to come, and there is still plenty of programs that could offer you a spot! For example, Paul Goldsmith-Pinkham (prof at Yale SOM) recently tweeted that he was rejected by Michigan, MIT, Harvard, Yale, Penn, Booth,… and got accepted at Columbia, HBS, and Wisconsin.