Ex-human services minister Stuart Robert vowed to "double down" on the Robodebt policy after being told it was illegal, a former senior bureaucrat says.
Former Department of Human Services (DHS) secretary Renee Leon told the Robodebt royal commission the Coalition government was "very attached" to the now-defunct scheme that automated welfare debt assessments.
In February 2019, she became aware the scheme was unlawful after receiving advice from the solicitor-general.
"In 30 years as a public servant, I had never discovered that I had been administering a program of scale that was unlawful," Professor Leon said.
Professor Leon said once it was clear the scheme was unlawful, she briefed Mr Roberts, who was the minister responsible.
Notes of a conversation made by Professor Leon were shown to the inquiry, in which she claimed he replied: "Legal advice is just advice."
In a second conversation with Mr Robert, Professor Leon recalled saying: "The best course is to apologise to our customers, to admit the error, and to inform customers and staff of the steps we will take to correct the error."
Professor Leon said Mr Robert replied: "We absolutely will not be doing that. We will double down".
When asked by counsel assisting Justin Greggery KC what happened to Robodebt, Professor Leon said: "I ended up having to stop the program in advance of a decision from the government to do so."
She was earlier asked why she thought the illegality of the scheme was not picked up earlier.
Professor Leon said one possibility was that someone knew "but they had already raised the idea with government that would save billions of dollars and they were reluctant to withdraw it".
"I hope that isn't the case," she added.
She later said: "The public service ought to have some red lines and lawfulness is one of them."
No paper trail
The commission heard there was a "long-standing and undesirable" culture of heads of departments delivering bad news to ministers verbally so there was no paper trail.
She said DHS had a history of senior management "yelling" and "publicly shaming" people and she had tried to change that culture.
Professor Leon said there began to be "consequences for people who were unhelpful for the government" and "people became more anxious to be compliant with ministers' expectations".
"Once you got to the point you had to put difficult things in writing, you were potentially on a collision course with your minister," she said.
She also told the inquiry of the practice of softening language in written briefings.
"So instead of saying 'This policy would cause significant hardship' you might be expected to say, 'The policy would cause significant concern'," Professor Leon said.
Professor Leon told the inquiry of how the relationship with her counterpart at the Department of Social Services, Kathryn Campbell, became strained after her appointment as secretary at DHS in late 2017.
She said while she previously had a "collegiate" relationship with Ms Campbell, she became aware the woman was undermining her to Mr Robert, the then-human services minister.
She said some secretaries who did not comply with the minister's requests were "completely on the outer".
"I know one secretary that resigned in such circumstances," Professor Leon said.
"Ministers would tell secretaries to move deputy secretaries to other roles if they were perceived to be unhelpful, even though the minister is supposed to have no say.
"So, it wasn't popular to give the government advice that what they were doing was wrong."
'I was the bad cop'
The royal commission heard that by 2019 Mr Robert had "very significant plans" to completely redesign DHS.
It would have created four separate agencies, the inquiry heard.
Professor Leon said the plans would "have involved very far-reaching and in my view difficult-to-implement changes to the portfolio".
She told the inquiry she did not believe the plan could be rolled out without "considerable impact on service delivery" and it would have broad industrial relations consequences, which would have included staff having to re-apply for jobs they had held for decades and contractors brought in.
"I was in the position, sometimes unfortunate for a public servant, in that something he was keen to do had some difficulties," Professor Leon said.
"I was the bad cop, as it were, advising against the policy," Professor Leon said.
Former minister for human services Michael Keenan, who oversaw Robodebt between 2017 and 2019, told the royal commission on Tuesday afternoon he never asked for advice on whether the scheme was lawful.
"I relied on the expertise of those people around me, and, in particular, I had great confidence in what I was being told by my own department," he said.
Mr Robert is scheduled to give evidence on Thursday.