NSW Labor says the Bega by-election in southern NSW should serve as a warning to the state government ahead of next year's election.