The Han did not pick Confucianism right away. The first choice after Liu Bang's establishment was the Huanglao School of Taoism, this lasted until the early period of Wudi's reign, for close to 60 yrs. It's important to note that scholars probably do not solely define their thoughts with one school or another.
The key aspect of the Huanglao may be that it is a compromise with the more authority-centric concept of Shang Yang, Han Fei, etc with the more humanist approach of Mencius, as it argues for a form of thought that is called 'wu-wei' or literally translated as do nothing.
Michael Lowe wrote
There was an obvious connection between the idea of wu-wei and the practice of imperial sovereignty. Avoidance of deliberate activity or decisions derived partly from disillusion with human values and the individual's judgment; a comparable idea came to be applied to the proper place and powers of the monarch. Ideally the monarch should refrain from taking a personal part in governing or making decisions; rather than make a deliberate attempt to exercise his authority, he should be content to take his ease, with his arms folded in his sleeves, leaving to his subordinates the work of managing the affairs of state. He reigned by virtue of his presence and his unspoken authority, in the same way as the unseen tao controlled the workings of the world of nature.
A cynic would argue that this was promoted by the early ministers of Liu Bang, who were of course powerful individuals of their own right, and thus argue for this as it benefits their interest. It probably would have switched in favor of a more powerful emperor had it not for the Dowager Empress Dou who is a firm believer of the Huanglao school and her influence lasted into Wudi's reign. An interesting thing to note is by that time, the Chancellor's power while remains significant, the prestige of those who hold it are unable to match the power of the post at Wudi's reign. The founding fathers of the Empire have pretty much died out with Sheng Tujia who died in 155 B.C, so the people who are obvious choices for the post now went from 'well they built the Empire' to 'what can you do for me'.
In a sense, choosing Confucianism in Wudi's reign was an obvious choice, the Emperor taking back the authority from the Chancellory when no one has the prestige to simply say 'no, and I know why because I fought with Liu Bang.'
Xu Chang was the last Chancellor of the Huanglao school [or more affiliated with it than another school] and he lost his job at 135.