There is one of the great authorities who asked regarding a shekhiv mera who gives a get to his wife and his intent is that she not be bound to a yavam, and it turns out that he divorces her out of love: from where did the sages know that it is a get? For in the Torah, in the portion of get, it is written: "And it shall be if she finds no favor etc." and perhaps the Torah only commanded the permission of a get when he divorces her out of hatred, because he hates her, and not when he divorces her out of love (Levush in the Responsa of Maharam of Lublin, siman 123, and his answer is forced, see there). However, in truth there is no question in this at all. And it is not only according to those who hold that even Beit Shammai, who said that one should not divorce unless he found in her a matter of immorality, [hold that] this is neither a mitzvah nor an obligation but merely good advice (Mishneh LaMelekh chapter 10, halakhah 21); but even according to what I wrote in siman 119, section 5, that it does not appear so from all the poskim and from the Shas and from the Yerushalmi, nevertheless, it was explained there in section 2 that this applies to a divorce against her will and not when he divorces her with her consent (so wrote the Beit Yosef there). And a clear proof for this is that the Torah also deals with a case where she desires the divorce, for we expound "and he shall send her" to teach that she may appoint a messenger, and it is obvious that she would not appoint a messenger when she does not desire the divorce (my brother-in-law, the great Gaon, author of Ha'amek She'elah). But from this there is no clear proof, as one could say it deals with a case where he hates her and she also hates him, and therefore she appoints a messenger, and the nature of the matter is such, as "water reflects the face to the face," and this reasoning exists in the Gemara (Yevamot 117a). However, this matter was already clarified from the days of the early prophets, for everyone who went out to the wars of the House of David would write a get of severance for his wife, and we expound it from a verse (Shabbat 56a). And they did so so that they would not remain agunot. Furthermore, it is explained at the end of Gittin that even according to Beit Shammai, who hold that one should not divorce unless he found in her a matter of immorality, nevertheless, if he transgressed and divorced, what he did is done. This shows that regarding the validity of the get, there is no difference why he divorces her, and if she was divorced, the get is valid; rather, that initially the Torah warned not to do so. And it must be understood how it is relevant from the Torah to distinguish between initially and after the fact? Rather, it is certainly so that regarding the essence of the get, there is no difference whether he divorces her due to immorality or due to another matter, and that which the Torah was particular about was not because of the essence of the get, but because of her insult. And in truth, according to Beit Shammai, he committed a prohibition when he divorced her against her will without a matter of immorality, and likewise according to Beit Hillel without "spoiling his dish," as I wrote at the beginning of siman 119. And consequently, when it is her will to be divorced and she has no insult in the divorce, he may divorce her even initially, even when he divorces her out of love, for regarding the essence of the get there is no difference for whatever reason he divorces her (and also proof from our teacher Moses, of blessed memory, who divorced Zipporah according to the explanation of Onkelos on "after her being sent away").
יש מהגדולים ששאל בשכ"מ הנותן גט לאשתו וכוונתו שלא תזקק ליבם ונמצא שמגרשה מתוך אהבה מנ"ל לחכמים דהוי גט והרי בתורה בפרשת גט כתיב והיה אם לא תמצא חן וגו' ואולי לא צותה תורה בהיתר גט רק כשמגרשה מתוך שנאה ששונא אותה ולא כשמגרשה מתוך אהבה (לבוש בתשו' מהר"ם מלובלין סי' קכ"ג ותירוצו דחוק ע"ש) אמנם באמת אין שום שאלה בזה ולא מיבעיא להסוברים דאפילו ב"ש שאמרו שלא יגרש אא"כ מצא בה דבר ערוה אין זה לא מצוה ולא חובה אלא עצה טובה בעלמא (מל"מ פ"י הל' כ"א) אלא אפילו לפמ"ש בסי' קי"ט סעיף ה' דלא נראה כן מכל הפוסקים ומהש"ס ומהירושלמי מ"מ הא נתבאר שם סעיף ב' דזהו בגירושין בע"כ ולא כשמגרשה מרצונה (כ"כ הב"י שם) וראיה ברורה לזה דהתורה מיירי ג"כ כשהיא חפצה בגירושין שהרי דרשינן ושלחה מלמד שהיא עושה שליח ופשיטא שלא תעשה שליח כשאינה חפיצה בהגירושין (גיסי הג' בעה"מ הע"ש) אך מזה אין ראיה ברורה די"ל דמיירי שהוא שונאה והיא ג"כ שונאתו ולכן עושית שליח וטבע העניין כן הוא דכמים הפנים לפנים וסברא זו יש בגמ' (יבמות קי"ז.) אמנם הרי נתברר דבר זה גם מימי נביאים הראשונים דכל היוצא למלחמת בית דוד כותב גט כריתות לאשתו ודרשינן ליה מקרא (שבת נ"ו.) ועשו כן כדי שלא ישארו עגונות ועוד דהא מבואר בסוף גיטין דאפילו לב"ש דס"ל דלא יגרש אא"כ מצא בה ערות דבר מ"מ אם עבר וגירש מה שעשה עשוי אלמא דלעניין קיומו של גט אין נ"מ מפני מה מגרשה ואם נתגרשה הגט קיים אלא דלכתחלה הזהירה התורה שלא לעשות כן ויש להבין איך שייך מן התורה לחלק בין לכתחלה ודיעבד אלא וודאי דלעניין עיקרו של גט אין שום הפרש בין מגרשה מתוך ערוה או מפני עניין אחר וזה שהקפידה התורה לאו מפני עיקר הגט אלא מפני עלבונה ובאמת לב"ש עשה איסור כשגירשה נגד רצונה בלא ערות דבר וכן לב"ה בלא הקדיחה תבשילו כמ"ש בר"ס קי"ט וממילא דכשרצונה להתגרש ואין לה עלבון בהגירושין יכול לגרשה גם לכתחלה אף כשמגרשה מתוך אהבה דלעניין עיקרו של גט אין שום נ"מ לאיזו טעם שמגרשה (וגם ראיה ממרע"ה שגירש צפורה לפי' אונקלוס על אחר שילוחי'):