A department overseeing the failed robodebt program paid external consultants for advice which flagged legal issues with the scheme, but did not take it on board, a royal commission has heard.
Commissioner Catherine Holmes said she was "appalled" by the admission this often happens in government departments.
Department of Social Services principal lawyer Anne Pulford confirmed if draft advice from consultants is not finalised, it is treated as not having been given.
Ms Pulford told the commission she had seen it happen many times.
"I'm appalled," Ms Holmes said.
Consultant law firm Clayton Utz provided draft advice to the department in 2018 flagging the method of debt calculation as legally problematic.
The commission is investigating the robodebt program which operated between 2015 and 2020 and falsely accused welfare recipients of owing the government money.
The scheme was initially proposed by the Department of Human Services, now known as Services Australia.
The commission heard when the Department of Social Services was asked to provide legal advice, the policy proposal was initially rejected.
Advice to human services in 2014, before the scheme was rolled out, raised concerns with the method of debt calculation called income averaging.
This automated process compared people's reported income with tax office figures.
But Ms Pulford revealed the social services department was pressured to finalise a policy ahead of the 2015 budget.
Former prime minister Scott Morrison was social services minister at the time of the scheme's establishment and backed the proposal as a budget measure.
In a draft brief provided to Ms Pulford for review in 2015, director Catherine Dalton asked what action needed to be taken to resolve the legal issues with the proposal.
Ms Pulford said the time frames were "tight" for her team to properly consider the brief.
Asked if the time pressure was coming from Mr Morrison so the proposal could be submitted to the finance department in time for the budget, Ms Pulford said "correct".
Ms Pulford said in developing policy, departments provide advice and clarify risks for the government which then decides whether to go ahead with the proposal.
"Essentially they take into account the risks and decide how they're going to proceed," she said.
The commission has not heard if the department's legal advice was given to Mr Morrison.
In 2017, Ms Pulford provided additional legal advice that was different to her original position.
She admitted she felt pressured to change her advice.
"I believe I felt pressure ... to provide an answer that justified taking action in circumstances which the broad general advice in 2014 would not have supported on its face," she said.
The commission is attempting to find out how the scheme was set up and rolled out contrary to policy and legal advice.
The program recovered more than $750 million from almost 400,000 people.
The inquiry is accepting submissions from people affected by the scheme until February 2023.
A final report is due to be handed down by mid-April.