The Court of Appeal case is expected to set a legal precedent which could define the extent of medical intervention required for females to have their gender reassigned to male.
The appeal was launched by Attorney-General Christian Porter to clarify reassignment legislation which came into effect 10 years ago.
It follows a State Administrative Tribunal decision which overturned a ruling of the Gender Reassignment Board of WA and authorised the men's gender to be changed from female to male.
Lawyer Steven Penglis, representing the two men whose identities are suppressed, submitted yesterday that the law did not require people to be sterile for gender reassignment.
Mr Penglis said such a "fundamental and profound" requirement would have been clear in the legislation.
The legislation allows gender reassignment certificates to be issued when a person demonstrates a belief in the gender they have been reassigned, has adopted the lifestyle and "gender characteristics" of that gender and has had counselling.
He said the requirement for genitals to be altered for reassignment did not mean internal reproductive organs had to be removed. Mr Penglis said the men were infertile because of their treatment.
The court was told the procedures included double mastectomies and testosterone treatment, which resulted in clitoral enlargement.
"On the facts of this case, save from hysterectomies, which I submit cannot serve any benefit under the legislation … these applicants can't do any more than they have done," Mr Penglis said.
But lawyer George Tannin, for the State, argued the men should not be legally recognised as males while retaining the "capacity" to have children. He said neither could be described as permanently infertile.
Mr Tannin, who broadened the appeal amid concerns it should cover issues relating to the interpretation of the legislation in the public interest, submitted that the "gender characteristics" referred to in the laws included external genitals and internal organs.
Chief Justice Wayne Martin, who said questions about the "essence of being male" were at the heart of the appeal, and Justices Michael Buss and Christopher Pullin reserved their decisions.
Outside the court, one of the men said he hoped the case would clarify the law in WA. He said he would be disappointed if the case overturned the SAT ruling. "I would be personally disappointed but I would be even more disappointed about the precedent it would set," he said.
"The significance of this case is to get clarity about exactly how the law should be applied."