They lost this lawsuit because they approached it from the wrong part of the 1st amendment.
A good lawyer could tell them they would lose on the religious argument, but they were likely to win if they took the *political* argument. That is, argue that the homosexual parade is a political statement, being unlawfully paid for with public funds as political advocacy, and that they, not politically supporting it, cannot be compelled to do so when it does not involve public safety.
Their lawyer could use the analogy that if the parade were to support the Republican party, in political advocacy of its platform, the courts would never permit forcing Democrat firemen to politically advocate for something they were opposed to do. While Democrat police could be compelled to provide security for the event, out of concern for public safety, not advocacy, firemen could not, as appearing in a political parade is not a core function of what they do.
So, because they chose the wrong argument, the city was able to weasel its way out of all the abuse leveled against the unwilling firemen.
It’s not considered a political stance anymore, since both parties support it.