Why do US flagship state universities vary so much in quality? In the United States, it is typical for each state to have one or more flagship state universities. All of them are reasonably good institutions, but some are absolutely top-notch, such as in Michigan, California, Virginia, and Wisconsin.

Typically, tuition at these universities is extremely expensive for out-of-state students and much cheaper for in-state students. So, at least in principle, these universities principally serve the best students from their respective states who choose to study at public schools.

How is it then that some schools became absolutely top-notch and others less so? To my mind there is no obvious factor explaining which of the state schools became top-notch; for example, Wisconsin is not, and never has been, an unusually populous or wealthy state.
Different states have very different political attitudes towards their flagship schools as well. This makes a difference with funding levels of course. It also makes a difference in terms of how money is to be used. A governor/executive, combined with a university president, that wants to grow a flagship institution can help earmark funds to attract top-notch researchers, link business activity and academic areas to grow in, and so on. It takes planning and vision as well as money, and that varies a lot from state to state.