Romania, while an ally in the final months of the war, still expected the land back. Transylvania was a part of Europe, but it was also in the sphere of Soviet influence. Stalin was the leader of Russia and this meant that he needed to show his influence in the places of Eastern Europe.
Romania had oil and Hungary did not. Russia need to have more oil, and Romania had more oil. Yugoslavia was not a reliable ally, and Hungary was close to Austria and Eastern Germany was not secure. These along with many others reasons was part of Why after 1945 Romania has had all of Transylvania as a part of the country.