I don’t see a contradiction. I agree the two marriages are correct.
Bathsheba Bates married Thomas Gaines, then removed to Truro after selling property in Suffolk County.
Bathsheba Gales married first Joseph Clark. Second Benjamin Perry.
The original question was about Bathsheba Bates marrying three times. Looks like no, she married once. The other Bathsheba, last name Gales, as shown in the record I posted here today, married twice, as you said.
There were two Bathshebas.
Maybe I’m missing something, which would not be the first time :)