I don't think the premise is really justified. I can't pretend that what I have to say here is really the most thorough or even a very good treatment, but I think it's worth breaking down this perception a bit. Confucianism was very important, and effectively patronized as the official court philosophy, in some imperial regimes, but far from all or even a majority. The regimes probably most strongly associated with Confucianism--the Song and Ming--were strictly speaking "neo-Confucianist," an intellectual movement critical of Taoist and Buddhist thought, even while it was greatly influenced by both philosophies. And while the neo-Confucianism of the Song-Ming period is very well known, it wasn't so much an ideology imposed by the court as one developed by the imperial intellectual class, and was in many ways (e.g. the sympathy for decentralization in some strands of neo-Confucianist thought) contrary to what the imperial court intended to achieve.
But to go back a little bit: yes, dynasties unassociated with Confucian thought existed. All the dynasties before Confucius must fall into this category, which if we wanted to be really broad and a bit silly with our definitions would probably mean the vast majority of all Chinese states ever to have existed. If we narrow our focus to strictly "imperial" regimes, then the first empire, the Qin, was explicitly established as a Legalist state. It was an important point to the Han state, which inherited much of the structure and ideology of the Qin empire, to suppress the outright patronization of Legalism, but even so the Han empire--and all Chinese empires after it--was very much rooted in Legalist principles, on which the concept of a centralized Chinese empire had been based to begin with. While the Han state, and in particular the Eastern Han, which pitched itself as a break from the Western Han, described in imperial ideology as more or less a continuation of the tyrannical Qin state, was responsible for the so-called "triumph of Confucianism," Han court ideology was hardly drawn directly from the lines of Confucian canon. Legalist principles were regularly adapted and adopted, and often justified by reference to Confucian or Daoist writings, and Daoist thought was popular enough in the later Han period to be the driving force of the Yellow Turban Rebellion. Indeed, Daoist philosophy was popular as a personal practice among the Han emperors and many later emperors, and was patronized by the court--several emperors experimented with Daoist alchemy, which not infrequently killed them. For example, Daoism has a fairly prominent place in Sima Qian, and Sima Tan considered it to be one of the pillars of early Han imperial social structure.
Similarly, while the Tang emperors patronized and encouraged Confucianism as a guiding principle of state, the reality is vastly more complicated, and the Tang empire is not usually very strongly associated with Confucianism at all. Emperor Taizong was a strong proponent of Confucianism, in its sort of post-Han form that blended in a great deal of Legalist and Daoist thought, and it was in the later Tang period that the first inklings of neo-Confucianism and Confucianist polemic against Buddhism and Daoism begin. But to the extent that there was a "court philosophy" during the Tang period, you'd have to say it was Buddhism, or alternatively Daoism. "Officially," so to speak, the imperial family (the Li clan) was strongly connected to Daoism, since they claimed descent from Laozi. Yet in practice, the imperial family patronized Buddhism much more strongly. Buddhist temples and monasteries were vastly more common than Daoist ones in the imperial cities, and emperors such as Daizong more or less openly practiced Buddhism or otherwise encouraged it.
During the later Tang period and then afterwards, the perceived decline of the state was in many intellectual circles blamed largely on the degeneration of morality caused by the mysticism of Daoism and Buddhism, and on the intrusion of foreign philosophies like Buddhism into traditional Chinese culture. It's in this environment that the neo-Confucianist courts of the Song and Ming empires developed. But it's very important to note that none of these categories are mutually exclusive. The Tang emperors were simultaneously Confucians, Taoists, and Buddhists, and different courts swung different ways. Even within the court there could be division or differences in interpretation. The Tang eunuchs were typically thought to be allies of Buddhism, which could cause friction when a non-Buddhist or anti-Buddhist emperor like the highly-Daoist Emperor Wuzong. Han period intellectuals justified Legalist principles by referring to passages in the classics and in Confucianist or Daoist literature. The very foundation of the imperial system was Legalism, which in itself was already kind of a mixture of various philosophical principles. Generally speaking, while imperial regimes might lean one way or the other, they were rarely so inflexible in their thinking that they could be called narrowly "Confucian" or "Daoist." Instead, the emperors and the imperial elite formed ideologies of their own drawn from many different influences, and often conflicting with each other in various ways.