Punishment, maybe, but utterly disproportionate, which reveals that human rights have no value in Thailand.
And embassies/Foreign Affairs depts, should do their job, issue warnings against Thailand and/or provide assistance to their nationals whose lives are at risk while processed by immigration.