Why did many 19th century artists create pieces that aligned with the views of their government

Many 19th century artists created pieces that aligned with the views of their government because they wanted to gain favor with the ruling class and to ensure their own financial security. Art was often used as a tool of propaganda to promote the government's agenda and to influence public opinion. Artists were often rewarded with commissions, patronage, and other forms of support for creating works that supported the government's views.