Maybe the main lesson to be learned from this unfortunate chain of events is for refugees to remain in the country that has offered them refugee status until their status has been upgraded to that of citizen.
Particularly where the refugee has been convicted, rightly or wrongly, of a crime in their home country and is at risk if away from the country of refuge, even if supposedly covered by any UN dictate.
It seems that at least a couple of official refugee associations in Australia advise that such, non urgent, overseas travel is not advisable, presumably for the very reasons as seen in this case. That Hakeem appears to have been given contrary advice by other organisations clearly did not lessen the risks.
In any event, it seems rather foolish to plan a honeymoon trip just a few months (by all accounts) before he would have qualified for an Aussie passport. It's still uncertain precisely how Bahrain caught wind of his trip to Thailand, possibly via official channels as noted in the OP, or maybe simply by word of mouth as he was no doubt still in contact with family and friends back home. He appears to have upset the Bahrain authorities subsequent to his arrival in Australia by criticising some highly connected officials (is this normal for those under refugee status?), so his movements may well have been under some scrutiny, who knows?
Thailand was an easy target as the party at fault, but these matters are never one of black and white. That their final actions to make direct contact with Bahrain resolved the issue is a definite plus. The actions of all actors, Bahrain, Australia, Thailand and Hakeem, all played a part and fully deserve any subsequent scrutiny.