The explanation of his words: For the sake of a mitzvah, it is always permitted to perform a shevut during bein hashemashot, and even for a voluntary matter, if one was preoccupied and hurried and could not have done it beforehand—it is permitted even for his own needs. For indeed, from the wording of the Shas in several places where it said that they did not decree a shevut during bein hashemashot, it implies that it also refers to a voluntary matter. And so it implies from the wording of Rashi (8a, s.v. "v'Rabbi") who wrote: For the shevut that the sages decreed regarding the prohibitions of Shabbat, they only decreed during the certain Shabbat, etc., see there. However, since we do not find this matter in all places except regarding eruvei techumin, and we hold that one only establishes an eruv for the sake of a mitzvah—and even not for a complete mitzvah but to greet his fellow and even to stroll, as is written in siman 415—and we also hold that if one established an eruv for a voluntary matter, his eruv is a valid eruv, therefore the Rambam, from his great wisdom, decided that for the sake of a mitzvah it is always permitted, and for a voluntary matter if he was hurried and preoccupied. But for a voluntary matter with ease, when he could have done it beforehand—certainly they did not permit it.
ביאור דבריו: דלדבר מצוה תמיד מותר בשבות בין השמשות, ואפילו לדבר הרשות אם היה טרוד ונחפז ולא היה יכול לעשות מקודם - מותר גם בצרכיו, דבאמת מלשון הש"ס בכמה מקומות שאמר דשבות לא גזור בין השמשות, משמע דגם אדבר רשות קאי, וכן משמע מלשון רש"י (ח': ד"ה 'ורבי') שכתב: דשבות שגזרו חכמים באיסורי שבת לא גזרו אלא בשבת ודאי וכו' ע"ש. מיהו מדלא מצינו דבר זה בכל המקומות רק גבי עירובי תחומין, וקיימא לן דאין מערבין אלא לדבר מצוה, ואפילו לא למצוה גמורה אלא לקבל פני חבירו ואפילו לטייל, כמ"ש בסימן תט"ו, וקיימא לן גם כן דאם עירב לדבר הרשות - עירובו עירוב, ולכן הרמב"ם מדעתו הגדולה הכריע דלדבר מצוה תמיד מותר, ולדבר הרשות אם היה נחפז וטרוד. אבל לדבר הרשות בהרווחה והיה יכול לעשות מקודם - בודאי לא התירו.