Successive Australian Prime Ministers had led a race to the bottom trying to attract the conservative vote.
The beginning was probably the Tampa Affair:
en.m.wikipedia.org/wiki/Tampa_affair
After that was the political crisis called Children Overboard, where the then PM falsely claimed, in order to turn public opinion against asylum seekers, that people arriving on an unauthorised ship had threatened to throw their children overboard.
en.m.wikipedia.org/wiki/Children_Overboard_affair
The people on Nauru are not illegal immigrants, they are asylum seekers, protected by international agreements. That's important to remember. Not that the treatment would be any more ethical if they were illegal immigrants. But governments have consistently called them illegal in order to convince the public that these people were doing something wrong.
Government catered to xenophobia by making a huge production of "stopping the boats", ostensibly on the grounds of stopping people smugglers. Many people died on over-crowded, unsafe boats, so stopping people smugglers wasn't necessarily a bad idea.
Except that in order to achieve that, Australia decreed that no refugee arriving by boat would be resettled in Australia, or even set foot on Australia.
Hence the misnomer of "off-shore" processing. Basically this means marooning people on Nauru or Papua with little in the way of facilities, health care, mental health care, or, more crucially, hope.
Australia refused to resettle them, the only options were to return to the places they fled from or stay stateless. There were a couple of resettlement attempts in Cambodia. NZ offered to take them, but were refused.
After a long campaign and public pressure, some women and children were brought to Australia, but the rest languish. There have been suicides, hunger strikes, people self-harming, harming others, dying from infection.
It is an awful, unforgivable violation of human rights. Australia has been condemned by the UN, but the current government has no appetite for changing the policy. Australia's new PM was an architect of off-shore processing, so things are not likely to change for the better.
Refuges have added immeasurably to Australia's civic and economic life over that last couple of hundred years. To subject people who are guilty of nothing more than being unable to safely in their own countries to such cruelty is a terrible thing.
There's more, from the role of multinational security companies to the complete lack of transparency in government processes, but you get the gist.