Watching a lot of Border Security Australia, and wondered who pays for the return flight:
ICAO Annex 9 chapter 5 - 5.10 When a person is found inadmissible and is returned to the aircraft operator for transport away from the territory of the State, the aircraft operator shall not be precluded from recovering from such person any transportation costs involved in his removal. 5.11 The aircraft operator shall remove the inadmissible person to: a) the point where he commenced his journey; or b) to any place where he is admissible.
Lufthansa Refusal of Entry 13.3. If you are denied entry into any country, you will be responsible to pay any fine or charge assessed against us by the Government concerned and for the cost of transporting you from that country. We may apply to the payment of such fare any funds paid to us for unused carriage, or any funds of the passenger in the possession of us. The fare collected for carriage to the point of refusal of entry or deportation will not be refunded by us.
While checking in to your flight, the airline officials will need to check that you have proper passports and visas for your destination. They're going to be strict about this because in general, if you are refused entry, the airline that brought you in is responsible to take you back.