The USA is irrelevant here.
Toyota made the decision that it was more profitable to export cars to Australia than make them there
It was a decision based on profitability
No, the USA is a good comparison.
Toyota’s decision is based on high production costs, not the ability or inability of Australia to sell cars built on its soil to its domestic car buyers. They of course are not the only companies to do so.