The A$1bn profit follows a troubled few years for the airline, full of delays, staff shortages and criticism.