Legalism was one of the four philosophic schools in ancient china. The legalists believed that ruler should govern his subjects with three ideas: Fa( law), Shu (Control) and Shi (Power). This philosophy was followed by Qin dynasty.
Legalism was a philosophical belief that humans are motivated by self interest and inclined to do wrong than right. It was propounded by Philosopher Han Feizi, it developed during a time of constant warfare.
The legalists prescribed rewards and punishments for specific behaviours. According to them the interest of ruling class was more important than the common people, and the central government must have absolute control and power over the people.
Expansionist justified the idea of Manifest Destiny because they said they were spreading democracy. They wanted everybody to be live like they do and to be democratic and what better way to do that than by spreading the word to the people living on the land that they already conquered.