The government is always a party in enforcement of a law enacted by government. The RFRA simply gives a defence to a party charged under the anti discrimination law.
From Section 9 of the law: "A person whose exercise of religion has been substantially burdened, or is likely to be substantially burdened, by a violation of this chapter may assert the violation or impending violation as a claim or defense in a judicial or administrative proceeding, regardless of whether the state or any other governmental entity is a party to the proceeding."
In neither the photographer case or the baker case was the government a party to the proceedings.