It may be a little late for an answer to your inquiry(I search this sub for Romania related questions once a month and somehow missed yours), but here it goes anyway and I hope it helps you.
First, I think it would be helpful to determine/fix some terms for future use and to avoid confusion. Moldavia/Moldova is the geographical area between the Eastern Carpathians at the west, the river Nistru at the east and the Danube at the south. Today, the western half(between the Prut river and the Eastern Carpathians) is known as Moldova/Moldavia and belongs to Romania. The eastern part is known as Basarabia and most of it belongs to the Republic of Moldova, with a small part belonging to Ukraine. Going forward I will refer to them as either Moldova(smaller one) or Basarabia.
Regarding the first question, the unification of the greater Romanian state took part in two episodes. The first one was in 1859 and was called the Small Union, being between Moldova(including only the Ismail province, a small southern part of Basarabia) and Wallachia (a photo for clarity: https://upload.wikimedia.org/wikipedia/commons/thumb/a/a0/Romania_si_Dacia_moderna_1868.JPG/796px-Romania_si_Dacia_moderna_1868.JPG). The southern blue and the eastern yellow merged into the United Principalities and from 1866 when the first constitution was signed it was officially called Romania. Basarabia did not unite with the other two as it was russian territory, annexed in 1812 from the Principality of Moldova.
The second episode was the Great Union and it happened at the end of WWI. I will skip the details and controversy of how Romania was considered a victorious country. Due to being a victor and due to the decline of the Russian/Austrain empires, Romania was in a good position to demand both Transylvania and Basarabia as territories, marching on the principle/right of self-determination of nations or peoples. Regarding the why it took place, the majority of the people residing in Transylvania, Wallachia, Moldova and Basarabia are essentially from the same culture. In antiquity they were called dacian/getae people "...the bravest of the trach" according to Herodot in the Melpomene(fifth book) and they had a common god called Zalmoxis, speaking the same language as said by Strabon in his book Geographya. They were all conquered by the romans, but put up a good fight as a united people under the king Burebista, who created the first dacian/getae state(which had more or less the same territory as current day Romania). For some time the roman province called Dacia(as the car) existed. By the time of the Aurelian retreat a culture was already formed in Dacia, being a mix of dacian and roman culture. This is mainly why the romanian language is even today classified as a latin language.
Some time later(XI-XII centuries) the three principalities of Transylvania, Wallachia and Moldova were formed and as the time went by all three had to go through more or less the same hardships, such as the constant austrian/hungarian threat, fighting against the Ottomans and Russians and so on. During the ottoman domination both Wallachia and Moldova were ruled by Fanariot rulers appointed by the sultan. Most of these Fanariot rulers would go on to rule successively in both principalities, thus implementing more or less the same laws/systems and so on. These hardships helped to define them as a people, but more importantly helped to define them in contrast to the other people around them. As such, because the people of the area already had a somewhat strong culture/sense of unity created and because none of the others that came/conquered managed to assimilate them in their cultures, in 1859 and 1918 the people of the area decided to unite in the same country. These sub-cultures exist even today, with some important distinctions between Transylvania, Wallachia, Moldova and Basarabia.
Regarding the second question, Basarabia or The Republic of Moldova is it's own country today because of the Ribbentrop-Molotov pact which established Basarabia as being in the soviet area of influence. In 1940 the Soviet Union gave Romania 48 hours to retreat it's army and administration from Basarabia. Germany also sent messages that they are in agreement with the soviets on this move and as such Romania basically ceded Basarabia which was annexed by the Soviet Union.
And now we enter very fresh history, as in 1991, with the fall of the Soviet Union, the Basarabians declare themselves independent and their own country as The Republic of Modolva. Unification with Romania would have been and currently is a very tricky subject for some reasons:
Sources: The History of Romanians by N. Iorga, Melpomene by Herodot, Geographya by Strabon, A Brief Illustrated History of Romanians by Neagu Djuvara.