The decision was made based on legal requirements outlined by the Religious Freedom Restoration Act (RFRA) that state the government may not put a "substantial burden" on religious entities.
MORE: http://feminist.org/blog/index.php/2013/08/01/judge-rules-church-can-protect-funds-from-abuse-settlements/