The immigration law is simple and unambiguous. In Australia you are required to pass through immigration at your first port of entry
No you don't, if you want to leave the designated "secure" area you have to clear, but you can transit .UA fly SYD-MEL with 'uncleared' passengers who go through CIQ in MEL. QF81 SYD- ADL - SIN will carry passengers from a range of flights of varied carriers between SYD- ADL - transiting in SYD not clearing CIQ. CX between ADL- MEL and BNE -CNS will have passengers from HKG beyond not clearing at first arrival port.
I believe same rules apply to crew.
UA crew do a domestic day return between SYD- MEL and CX crew will sometimes change at the final port of departure.