I am reading Henry Kissinger's "On China" and they gloss over it pretty quickly. It is mentioned that the original seat is given to the Nationalist government on Taiwan as that was the recognized government at the time. What I don't understand is why China was included in the security council in the first place? I understand they had a massive population but at the time not industrialized and embroiled in civil war. Any insight would be appreciated.
/u/JosephWilliamNamath has already recommended a post that does a very good job of covering the PRC's elevation to the Security Council and a UN seat.
However, as per your question on why was (a) China included in the first place, I would say that the perception of China's potential was such that it was already recognized as a possible world power by the end of the war (Roosevelt even considered it to be more important than Britain) and one of the "Four Policemen".
Even though, as you say, it was going through a very tumultuous period at the time, the fact remained that it was generally agreed that whatever China was going to emerge at the end of the war, it was going to end up the most powerful sovereign actor in continental Asia on account of Japan's loss and the other great powers being largely tied up elsewhere (the Soviet Union's involvement was thought to be limited). Even at the time some regions of China were in possession of extensive and relatively modern-ish industrial bases with huge economic potential. Also at the time it was not immediately apparent that China would go back to fighting a civil war following the defeat of the Japanese, so the division between the Nationalist forces and the Communists was not always made apparent in the evaluation of China's power.
Some relevant reading:
Five to Rule Them All: The UN Security Council and the Making of the Modern World
Debating Franklin D. Roosevelt's Foreign Policies, 1933-1945
Not to discourage other answers, but this was answered a while back by /u/onetruepapist in this post.
I hope that helps!