The Star Wars movies trick you into believing that the Jedi and the Rebels are the good guys, and the Empire and First Order are the bad guys. However the exact opposite is true.
First of all, the Galactic Empire brought order to the galaxy. If you watch the prequels, you see how ineffective the government of the Old Republic is. When planet Naboo was invaded by the Trade Federation, they did not take action and needed to set up a committee to investigate whether Naboo was even invaded. They also were ineffective at enforcing their authority in the Outer Rim, and those planets were run by gangsters.
However, the hero Palpatine ended the Naboo crisis by being a double agent, getting the Trade Federation to invade Naboo under the persona of Darth Sidious so that he would be able to get a vote of no confidence in the senate that removed Chancellor Valorum and got himself elected Chancellor so that the Republic would be run by a more effective leader.
Later he was able to make the government more effective in Attack of the Clones by getting the senate to give him Emergency Powers and by having clone army created to help the Republic defeat the Separatists in the Clone Wars. By being a double agent as Darth Sidious, infiltrating the Separatists by having his apprentice Count Dooku become leader of the Separatists, he was able to get Anakin to finally defeat them on Mustafar bringing an end to the Clone Wars.
However you may argue that Order 66 was bad because the Jedi were killed. But Order 66 was justified because the Jedi were a threat to the stability of the Galaxy. Order 66 was a reaction to Jedi commiting high treason, attempting to assasinate Palpatine, the legally elected Chancellor.
The Galactic Empire was a much more effective government than the Republic, enforcing their authority in the Outer Rim, bringing order to the galaxy which would be completed by the finishing of the construction of the Death Star. However a bunch of traitors established the Rebel Alliance to overthrow the legitimate government of the galaxy, causing another civil war.
Another argument made against the Empire is the destruction of Alderaan by the Death Star. However Alderaan was a major base of rebel operations due to Princess Leia’s father being one of the leaders of the Rebellion. The destruction of Alderaan was necessary to end the war by defeating a major base of rebel operations and to cause the rebels to surrender. Think of it as Hiroshima and Nagasaki.
After the overthrow of the Empire, the Canon aftermath books describe the disaster that struck the galaxy. There was major instability, a rise in crime as underworld dynasties have regained dominance over worlds once kept free of their toxic influences by the Empire, and the Empire’s overthrow also caused economic disaster as there was a loss of jobs, income, and even lives.
The Canon book Bloodline shows that the New Republic is just as ineffective as the old, with the senate full of two competing factions causing gridlock and stagnation.
In the sequel trilogy, the First Order is the successor to the Galactic Empire and therefore is the heir to the legitimate government of the galaxy, fighting to restore the legitimate government and order to the galaxy.