Unconscionable contracts, especially when one of the parties is a taxing jurisdiction, have no ethical force. I'm not certain that this was an unconscionable contract, but you have to at least make the argument. What consideration did the people of this municipality receive in exchange for this encumbrance placed on their liberty?
I read the contract as being about the use of publicly owned space for the docks. That seems more like a municipal corporation making a stupid agreement than it does an encumbrance on anyone's liberty. Rent private space for your bike racks...
No, a contract is not simply a contract. Contracts are only enforced when a court agrees they are enforceable. A court can declare a contract unenforceable for a variety of reasons, such as if it was ill-formed, one side was overwhelmingly more powerful, or the contract is against public policy (such as non-compete agreements in California).
And in this case, Lyft is simply trying to ascertain that the courts will uphold this contract. No need to hate on them simply for taking the city to court.