similar ethnic and religious makeups
That's somewhat dubious, although not especially relevant to your ultimate question. Ethnically, if we're just saying they're all Arab, sure. But the tribal identities are distinct. What are today the UAE ruling families governed tribes whose territories were basically confined within the contemporary territory of the UAE. For example, the al-Nahyan (Presidents of UAE) and al-Maktoum (PMs of the UAE) would seasonally migrate from Abu Dhabi and Dubai (respectively) the Liwa Oasis.
religious
This is where the two countries are less similar. Saudi Arabia has a huge Shia population, and critically this population predominates in Eastern Province, where almost all of Saudi Arabia's oil is.
To get to the substance of your question though, the basic answer is:
British protection.
During the time of the Ibn Saud's conquests, what is now the UAE was referred to as Trucial Oman and also included Bahrain and Qatar, but was not a single entity. Rather, the British had "trucial" agreements with all of the ruling tribal entities. They also had an agreement, albeit a non-controlling one, with the Saudis.
While there were very serious border disputes, as far as I'm aware Ibn Saud never made a serious attempt to conquer what is today the UAE. He did make such an attempt on Kuwait, which also had an agreement with Britain, and as a result they reach a mediated dispute.
This is in contrast with the Kingdom of Hejaz, which did not have this kind of agreement with the UK, which allowed them to be conquest. Again, despite the relation of their Hashemite ruling families, this was in contrast with Transjordan, where Britain helped defeat Saudi incursions and to negotiate a settlement.
Perhaps the more interesting question is why Bahrain and Qatar aren't part of the UAE.
The UAE was formed after Harold Macmillan's announcement that Britain was withdrawing from "east of Suez" and reneging on its defense agreements with the Gulf sheikhs. Bahrain, which was the first Gulf state to discover oil, had traditionally ruled Qatar despite being smaller. When the formation of a United Arab Emirates of some kind was put forward, they were both mostly concerned with their relations to each other and eventually went separately. The joining of all the emirates into the UAE was primarily complicated by territorial disputes between the Sheiks and with Iran. Britain's defense agreements guaranteed, for example, Ras al-Kheimah's control over its islands in the Gulf, which were claimed by Iran. RAK refused to agree to Britain ending this defense agreement and joining the other emirates of the UAE until Britain and Iran guaranteed its territory. They did so, and RAK joined the UAE, but Iran then invaded the Islands and they remain a major dispute between the UAE and Iran to this day.
I hope that basically answers your question :)
Sourcewise:
Eugene Rogan's The Arabs: A History discusses this, more specifically see Kristian Coates Ulrichsen's The United Arab Emirates: Power, Politics and Policy-Making and Philip Khoury and Joseph Kostiner's Tribes and State Formation in the Middle East.