Why is the UAE the only country with two flag carrier airlines?
Because the United Arab Emirates is, as the name suggests, a federation of seven loosely-affiliated emirates (the largest and most populous of which are Abu Dhabi and Dubai, in that order), each with its own royal family.  Emirates is based in Dubai; the Emir of Abu Dhabi, Sheikh Khalifa (who also happens, by longstanding convention, to be the president of the UAE), wanted his emirate to have its own flag carrier, and so Etihad came into being (founded by Sheikh Khalifa's personal pilot, no less).