I know it's an old thread - but surely immigration officers can deny entry to any (non-citizen) for any reason perfectly legally? Entry to any country for a foreign national is clearly not a right but is a privilege granted by an immigration officer under their discretion - they are well within their rights to refuse entry for any or no reason.
So saying that immigration officers illegally deny entry is a bit misleading. As to whether they should allow it is a different matter, of course!