Lawyers (plural), not lawyer.
Why do they have to pay the plaintiff's lawyers? Because they won and Moore lost. This is a federal civil case and legal fees can be ordered paid by the losing side and there's a motion before the court for these fees. Because Moore was sued in his official capacity as Chief Justice of the Supreme Court of Alabama, not as an individual, the losing side is the state of Alabama, not Moore personally.
When the judge issued his order for fines when Moore refused to remove the monument, Moore would not be the one that paid the fines. Those fines would have to be paid by the state of Alabama becuase Moore was sued in his official capacity, not personally.
Okay, I'm now clear on what you mean. Thanks.
But, the possibility of having to pay the plantiffs legal fees in the event that he wins is all the more reason not to get a lawyer yourself (of for the city to get one). Opposing lawyers talk and when lawyers talk they charge for the time. Again, no need to get caught up in that game.
Even without a lawyer, the other lawyer will call and a call and call. If the possibility exists that you may end up paying for this time, tell him do not call! Again, the only way to win is not to play the game. Even if you (or the city in your example) should get stuck with the plantif's legal fees, those will be far less than the bill would have otherwise been in a full fledged legal battle. And, you are in much better position to argue the fees are excesive if your side has not been party to running them up.