Software license ≠ terms of service.
They can give you the right to reuse their source code for building your own service using your own network (an aspire to give you this right), but still forbid you to connect to their service on their network with third party clients.
In practice, they don't seem to enforce that a lot (anymore).
It's unlikely that their ToS would be enforceable in court. The fact that Apple never tried to sue Beeper speaks to this.
It doesn't necessarily go to court. In the past, there was a project that was a light fork of Signal, LibreSignal, that was Signal but without the google libraries. They have asked the developers to stop distributing a version of it that connected to their network, and the developers stopped the distribution.
I guess they didn't do so for Molly. I suppose a lot of water has passed under the bridge.