Not content with simply letting religious organizations serve their communities, the city of Philadelphia recently cracked down on foster care referrals to Catholic Social Services (CSS), threatening to sever its relationship with the charity altogether. Apparently, the Church’s teachings on homosexuality and the Catholic agency’s practice of not allowing gay couples to become foster parents is unacceptable to polite society—despite the 100-plus children helped by the organization annually.

Now, as of May 16, foster families are asking a federal court to stop the city ruling that bars CSS from receiving foster placements. This raises the question: is living out a traditional Catholic faith beyond the pale, according to the government?

Plaintiffs Sharonell Fulton, Cecelia Paul, and Toni Lynn Simms-Busch are all foster parents with CSS, an organization that says it “currently cares for 127 children daily” via referrals from the city. With help from the public interest legal firm the Becket Fund for Religious Liberty, CSS and the plaintiffs allege that the First Amendment’s Free Exercise and Establishment clauses make it so that “government [is prevented] from officially preferring one denomination over another or discriminating against a religious group for its religious beliefs and practices.”

“Defendants are applying their laws in a manner which penalizes Catholic Social Services for its religious beliefs.” says the suit.

The city sees it differently: “As CSS works on the City’s behalf, we cannot allow discrimination against qualified couples…simply because of whom they choose to marry. We would not allow such discrimination against, for example, Catholic couples or ‘mixed-race’ couples, and we cannot allow it with respect to same-sex couples, either.”

Nearly 100 families currently foster through the agency. Around 50 children achieve “permanency” (as they call it) per year, by either being adopted or returning to their biological families. Philadelphia has over 6,000 kids that have either been placed in or are waiting to go to foster families. And the need for these families is dire: just two months ago, the city put out a call claiming they needed over 300 new fosters to adequately deal with the influx of children into the system. According to the Philadelphia Inquirer, it was the “first major recruitment in a decade.”

There’s certainly a case to make that Catholic teachings on homosexuality—and Catholic Social Services’ adamant adherence to those teachings—negatively impact children who could be cared for by gay couples. Much of the literature on the matter indicates that same-sex parents are not measurably different than heterosexual parents in terms of quality of care.

But Philadelphia is going well beyond mounting a counterargument: they’re trying to limit the good that can be gotten from a religious organization over a disagreement with views they deem backwards rather than putting first the wellbeing of children. As a result, according to Lori Windham, senior counsel at Becket, over a dozen foster homes are sitting empty. Families who want to take in more children and serve the city’s needs are currently barred from doing so.

For all we know, no tangible harm was done by CSS. No gay couples complained, according to Becket lawyers. And CSS doesn’t just send away gay couples: it refers them to one of the 26 nearby agencies. This is a good policy, one reminiscent of bakers who refuse their artistry to gay couples yet still refer them to their competitors. People of faith should have the freedom to do that without having to exit the marketplace altogether.

After all, sometimes adhering to your conscience is bad for business—but that’s a good test of whether it’s worth it. And sending customers you don’t serve to your competitors creates decent (though perhaps emotionally taxing for gay couples) outcomes on all sides.

Christian values are in competition with one another in cases like these. On one hand, 1 Corinthians 6:9-10 asks us “Or do you not know that the unrighteous will not inherit the kingdom of God? Do not be deceived; neither fornicators, nor idolaters, nor adulterers, nor effeminate, nor homosexuals…will inherit the kingdom of God.” On the other, Christians are called not to judge, but to serve—the poor, the hungry, and the downtrodden. Yet ultimately whether or not to place foster children with gay couples is CSS’s choice to make, a choice that’s now been infringed upon by Philadelphia’s government.

At The Federalist, John Daniel Davidson writes: “The city’s policy is indeed cruel and bigoted: it punishes orphans and foster children who need families to care for them, and it targets Catholic Social Services for traditional beliefs about marriage that it finds repugnant.” He’s right, though the flip side can also be argued: it’s similarly wrong for Catholic Social Services to refuse to work with gay couples when they could be maximizing their impact.

Yet of the same token, how many children could miss out on quality care—period—if CSS is no longer given referrals? Unfortunately, all points can be true at once. But under such circumstances, prioritizing homes for children, not using them as pawns in a political campaign against the Catholic Church, should be top priority.

Liz Wolfe is a writer from Austin, Texas. She writes regularly for Playboy, Reason, and the Washington Examiner.