Stalin met with Churchill and Roosevelt at Yalta because the three were allies in World War II. By the time of FDRs last "Big Three" conference, Soviet troops were moving toward Germany from the east while British and American troops were advancing from the west. Destroying Nazi power and liberating German-captured territories was the Allied goal.
By February of 1945, eight months after D-Day, the Allies believed Hitler would lose. To make sure future German leaders would not cause a third world war, the Allies agreed to break Germany apart when the war was over. The Soviets would occupy the eastern part of the country while France, Britain and the USA would occupy the west.
To finish the war in Europe, however, Hitler had to be defeated in Berlin a longstanding Soviet objective. To reach the Reichs capital, Stalins soldiers had to march through other countries aligned with, or captured by, Germany. One of those countries was Bulgaria which the Red Army first entered, then occupied, on September 9, 1944.
By the time of the Yalta Conference, Soviet troops were only 40 miles from Berlin. Besides Bulgaria they had also liberated the Balkans, Poland, Romania, and much of Czechoslovakia and Hungary. Churchill and Roosevelt wanted Stalin to agree that Poland would have free elections after the war. They also wanted democratic elections in all other lands under Soviet control. To make sure those events happened, Churchill and FDR urged Stalin to sign the "Declaration on Liberated Europe."
Ever the cagey politician, Stalin signed the Declaration. Had he refused, Churchill and Roosevelt would have been even more suspicious of his true intentions. By agreeing, Stalin likely thought he had time to consolidate his pro-Communist base of power in each Soviet-occupied country.
As it happened, Stalin never did allow free elections in the Eastern European nations he controlled. Once his troops were there, who would throw them out? And once the Soviets were in charge of those other lands, as they were of the 15 republics which then comprised the Soviet Union, Stalin was free to export a system hed relied on for decades to help industrialize the vast expanse of the USSR. Forced labor camps, which we now know as the GULAG Archipelago, became home to many thousands of people, including children.