You are meaningfully misquoting here ("doing their job" not "following orders", which has a different ring to it, at least for me).
Also, apparently they do have brains capable of thinking because: "Eventually, they accepted that we were journalists and that they disagreed with detaining us."
Apparently they were given information by the US embassy that these people were an "active thread". Perhaps they could have figured out that this was bullshit sooner, but I don't think it's the police who are at fault here.
Also, apparently they do have brains capable of thinking because: "Eventually, they accepted that we were journalists and that they disagreed with detaining us."