A man was heard screaming in the water moments before he died after a shark attack in Sydney, witnesses have said.