Either Carol I to Romania, Alexander of Battenberg in Bulgaria, Otto in Greece, why did these newly independent kingdoms choose these foreign nobles instead of locals?
Good question! I can only speak for the Romanian case, but I am of the opinion that the considerations behind these choices were not wholly different in Greece and Bulgaria either.
The Romanian Principalities of Muntenia (South) and Moldavia (East) had actually been united since 1859, when both 'states' organized so-called 'ad hoc' electoral meetings and elected the same ruler, Alexandru Ioan Cuza. This did not sit well with the Ottoman Empire, which invariably would lose some influence in the area, if the two regions would unite under a single ruler. The same applied to the Russian Empire, whose interests in Moldavia (and what is now Bessarabia) were hindered by a united Romanian-speaking state.
The union was accepted provisionally during Cuza's lifetime, and the state would still be called 'the united principalities...'. The Romanian political elite, generally trained at universities abroad, in France or Germany, kept lobbying with the other 'Great Powers' of the mid-nineteenth century for the Principalities to remain united even under a different ruler. The political elite was extremely strong at the time, with a few established families who had actually had the running of things for decades. Cuza's authoritarian tendencies caused a coalition between liberals and conservatives, who basically deposed him in 1866.
The leading politicians then moved very quickly, and brought Carol of Hohenzollern Sigmaringen as the would-be ruler of the Principalities. The reasons for a foreign ruler were twofold: initially, the ad-hoc reunions had been petitioning for a foreign ruler since 1857, seen as a means of ensuring that the other Great Powers, and particularly France and Russia, would take the monarchy that would come with the newly-established Romanian state seriously. A monarch who was part of one of the royal houses of Europe would have been someone to impose a certain modicum of defference, able to negotiate as an equal on behalf of his country, something that territories which had previously been subservient to the Ottoman Empire direly lacked. For many peace conference in the early to mid-nineteenth century, where the fates of various European territories were decided upon, Romanian officials were barred entry, having to resort to petition their case through various benefactors (generally French). Things were still very far away from Wilson's principle of nationalities, and some obscure peoples' notions of unity or self-determination, somewhere in the Balkans, mattered not one bit at the political discussion table.
The second reason had to do with the very strong political elite that I mentioned earlier: a foreigner who did not even know the local language would have been someone much easier to control and contain, compared to a Romanian. In theory at least, a foreigner would have also been thought to rule more impartially, not favouring one political side over the other. In practice, the liberals would dominate much of the governments until the late 1920s, when the political scene radicalized in Romania as elsewhere.
So, in short, respect, power to negotiate, control by local politicians, impartiality.
A European monarch can trace their lineage to the Roman emperors, and he (and his family) are installed by the Christian God as rulers of their people. They have divine right, and "blue blood". They are a subspecies of human that God decided should rule the rest.
So you can't exactly promote your warlord to king, you have to add royal blood. And royal blood at the time meant some minor Hapsburg, after the Holy Roman Empire collapse. Russian, German, British, the old French and the new Bulgarian, Greek and Romanian kings all came from this network of inbred Austrians.
Today we only think of kings as politicians, as the heads of state, but then they were biologically different, they had in their flesh and blood something divine, and you had to import some of that divinity through marriage or, better yet, just import a full grown man to lead you. The Russians for example imported Austrian/German women to marry into their local kings (and sometimes usurp them!). So this phenomenon is just the understanding of divine right to rule at the time.