In 2–3 sentences, describe the ways in which Confucianism helped the Han and Tang Dynasties establish legitimacy and stability in their governing systems.

Confucianism helped the Han and Tang Dynasties establish legitimacy by providing a moral framework for rulers based on values such as benevolence, filial piety, and social harmony. By promoting Confucian teachings as the basis for governance, the dynasties were able to appeal to the moral authority of the philosophy and gain the support of their subjects. This helped create stability within the ruling system, as Confucian principles were seen as a unifying force that upheld social order and hierarchy.