I understand that the permanent members of the UN Security Council are the "winners" of World War II; each contributed massively to the war effort. But even before WWII ended, the truce which halted the Chinese Civil War (so efforts could be focused against Japan) had largely fallen apart and the country was once again at war. This fighting would continue until 1949, when the Nationalist forces were forced to flee to Formosa and the Communists took power in the mainland. This concluded almost 40 years of conflict.
So why did France, Great Britain, the Soviet Union, and the United States allow a country dealing with such dramatic internal turmoil join the Security Council? Were both the Western powers and the Soviet Union confident that "their guy" would emerge victorious and therefore banked on ending up with an additional ally on the council? (I know the Soviet Union would later boycott the Security Council based on other countries' refusal to recognize the PRC.) Did China's addition face any resistance from other future memebers of the Council?
A sub question (which perhaps deserves a separate post) to this: Were any other countries considered for Security Council inclusion?
There are a few major reasons why China was added to the Council despite their internal weakness and inadequate display against the Japanese during WW2. The latter part isn't really that important- France fell in 1940, whereas China single-handedly dealt with Japan from 1937-1945, with America entering in 1941. And weakness wasn't necessarily a big issue as well. Today, the UK and France participate in international peacekeeping and global conflicts and are recognized as prime military powers. But in 1945 both the UK nor France could afford or support another major war against, well, anyone. They soon found this out either the easy or hard way after colony upon colony declared independence, some using violence to do so. In this respect, both nations were just as weak as China but on different fronts; they couldn't afford to maintain their empires which quickly dissolved, while China was able to quickly turn around their fortune and fight a war against the US by 1950. In this perspective China isn't necessarily the weak little dwarf, but rather that the US and USSR were so powerful exiting WW2 that whoever else was on the council didn't really matter for years to come. Indeed, it is the USSR and USA who primarily fight/fund the major proxy wars throughout the Cold War, NOT the UK and France.
The big reason for China's inclusion at the time, however, was certainly power politics. FDR actually had a fond attitude towards China during his presidency, and everything I've read from Chinese viewpoints cites that FDR wished to one day see China as a major power, allied with the US. The US and China have a long history of cordial relations that stand out among Western nations; throughout the 1800s while France and the UK went to war with China multiple times, including large-scale invasions, America limited their belligerent interactions in China (for multiple reasons, obviously the Civil War being one). There's also a long history of tons of religious missions led by Americans to China, and by the early 1900s America played a big role in the upbringing of Shanghai's theater scene. Basically, America had a lot of cultural influence on China by the Republican period in ways that other Western powers didn't. So by the formation of the UN, the world's new superpower had its eye on China kind of as some sort of baby to be nurtured.
The other major nation with interest in China was the other world superpower, the USSR. The history of Sino-Soviet relations has had tons of research written on it. It is an expansive topic covered by many experts. Where America played the cultural gifter, the USSR played the supportive father to Nationalist China and the CCP. Much of the KMT's success pre-WW2 is due to massive Soviet funding and materiel supply. Stalin supported Chiang against the Japanese until America got involved, at which point Stalin threw in his lot with Mao. The whole point of all this writing that has nothing to do with the UN is that both superpowers post-WW2 had a lot riding at stake in China after the War, and each side knew that it would blow up. They just wanted it to blow up in the other's respective faces.
Unfortunately for Chiang, FDR died and along with him the stalwart support for China among Congress. But it was still agreed upon by the USSR and US that China deserved a spot among the Council for their participation and dedication in the war, despite being quite weak. Famously, Churchill despised this and railed against including the Chinese days on end. But America was immensely powerful and most of Western Europe was in their debt, while the USSR was also immensely powerful and controlled Eastern Europe. Churchill could see the writing on the wall, he just didn't want to; the days of the UK and French supremacy over the world and politics was over.
So that's more or less why China was included. After the war the stake at which the US and USSR was involved in China increased in certain ways. The USSR occupied Manchuria, while US airplanes transported Chinese troops. Although the US never did deploy ground troops to China, they did supply the KMT with loans, materiel and training. They also sent some experienced, but ultimately ineffective, military leaders and diplomats to China, including General George Marshall (yes, that Marshall), and Patrick Hurley. But as so often happens in democracies, while Stalin had ultimate authority to act decisively in China, there were many congressmen in DC not so enthusiastic about being involved in China. There were certainly hardliners, mainly extreme anti-communist senators, who voted and tried to pass laws which would up US support in China, but the overwhelming amount of senators wished for no part in the conflict, including Truman. There were many interesting ideas from US diplomats in China at the time, like a Five-nation trustee over Manchuria kind of like how Germany was partitioned after WW2, but what really ended up happening was US diplomats who had no experience with Chinese diplomacy or culture being outwitted and deceived by Stalin and Mao, which leads to the certain CCP victory in the mainland.
edit: I saw your subquestion, and im not exactly sure what you mean. There are more than five members of the UNSC (15 in total), just five are permanent with veto authority. To clarify for others who can contribute, do you mean permanent members?