Japan changed from an empire to a representative democracy following World War II. While government reforms under the American occupation were initially very liberal, the Cold War eventually caused a shift in policy that led to a more conservative policy in Japan.
Every major city in Japan except for Kyoto was severely damaged at the end of the war, and the occupying American forces controlled the entire country. While Emperor Hirohito was not deposed or tried for war crimes as some had feared, he was made into a purely ceremonial head of state with no political power. Women were given the right to vote for the first time. Shinto, previously the state religion, was separated from the government and an attempt was made to break up the major corporations, or zaibatsu, that had earlier dominated Japanese industry and politics. Political parties formed and reformed after having been banned before war broke out, and socialists and other leftists who had previously been banned were allowed to operate in public again.
The American occupation supported this initial liberalization, but as tensions escalated with the Soviet Union, they pressured the Japanese government to reverse course. Politicians from the war era were pardoned for their crimes and reintegrated into the government. Communism and organized labor were discouraged once more and there was even talk of repealing the antiwar amendment the Americans had originally pushed for. The latter ultimately didn't happen, but as a result of these policies, the composition and policies of the postwar government remained remarkably similar to those that existed before the war.