They have insisted the case has implications for freedom of expression across the UK.
Family barrister David Scoffield QC said: "They could not in conscience provide a product with a message that was inconsistent with their deeply-held religious beliefs in circumstances where the evidence was clear that they believed that to do so would be sinful."
Ashers' owners were ordered to pay £500 damages after a County Court judge ruled they directly discriminated against Gareth Lee in refusing to make him a cake featuring Sesame Street puppets Bert and Ernie with the phrase "Support Gay Marriage" for a private function marking International Day Against Homophobia two years ago.
Mr Lee, a member of the LGBT advocacy group Queer Space, paid the £36.50 in full at Ashers' Belfast city centre branch, but received a phone call two days later and was told the company could not fulfil his order.
Mr Scoffield represented the McArthur family at Belfast's Court of Appeal and said the person who took the order had no idea what Mr Lee's sexual orientation was and had never heard of Queer Space.
He said the alleged discrimination was not against Mr Lee, it was against the message, but the law only covered harm caused to an individual.
"Discrimination must be against the person, not against an idea or an object."
He added: "A cake cannot have a political opinion or a religious belief, it is a person who can do so."
Ashers, a name with biblical connotations, has six branches in Northern Ireland.
The firm's barrister said it was not contractually obliged to provide the cake, but added: "This was not a refusal to sell a cake, it was about the refusal to sell this particular cake."
He told the three senior judges the crucial question was why the order was not fulfilled.
"This case is an important case. It raises, we submit, an issue of principle.
"The issue is the extent to which those who hold such religious convictions can be required by the law to act in a manner inconsistent with their convictions."
He added: "It makes it extremely difficult for any business such as a printer or someone who, as we have seen in this case, creates T-shirts or creates cakes, to run any kind of bespoke service if faced with the position that someone could come through your door and order something which is clearly objectionable."
The hearing continues and will hear submissions from a lawyer for Mr Lee.