They were serving non-Catholics / non-Christians, and they were not proselytizing. Just doing what a secular non-profit does. As you know, the Catholic doctrine disallows proselytizing, and (as they argued), Jesus's message was to serve all.
So the state had decided Catholic Charities wasn't focused enough on what it considered religion.