Border officers at international airports are trained to risk assess passengers and identify those individuals who may be of interest for customs, biosecurity, health, family law, law-enforcement or national security reasons. They are essentially law enforcement officers and their powers are broadly worded in legislation.
I don't know of specifics but I suspect they would be within their rights to ask whatever they see fit in order to determine whether you should be allowed entry into the country. Are you an Australian citizen?