To answer your question, the Torah doesn’t have divorce on demand and just because one spouse wants it and asks for it does not mean halacha says he has to give it. If there’s no obligation to give it, the halacha supports declining to give it. Only after a beis din holds a case and determines it is halachicly required and formally demands and requires it be given per halacha, is there an obligation to give. In other cases where the intention is to give it but the other spouse is committing an injustice such as improperly withholding access to the children or using secular courts to obtain money or assets from the other, often a rov will advise it is proper to hold off giving it until the spouse corrects their improper and unhalachic actions against the spouse.