Rambam explains that engaging in commerce and work for sustenance is necessary and proper, provided one's goal remains spiritual perfection — the effort itself is not an obstacle to trust in God but a necessary means, and one who expects miracles without effort is misguided.
והמשל בו: שישים הכונה באכילתו ובשתיתו, ומשגלו, ושנתו ויקיצתו, ותנועתו ומנוחתו - בבריאות גופו לבד. והכונה בבריאות גופו - שתמצא הנפש כלים בריאים ושלמים לקנות החכמות וקנות מעלות המידות ומעלות השכליות עד שיגיע לתכלית ההיא. ועל זה ההקש לא תהיה אז כונתו אל ההנאה לבד עד שיבחר מן המזון והמשתה הערב, וכן בשאר ההנהגות - אבל יכון אל המועיל. וכשיזדמן שיהיה ערב - יהיה. ושכיזדמן שיהיה בלתי ערב - יהיה. או יכון אל הערב על דרך חכמת הרפואה: כמי שחלשה תאותו למאכל - יעירה במזונות המתובלים הערבים שנפש האדם מתאוה להם. וכן מי שהתעוררה עליו מרה שחורה יסירה בשמיעת הנגונים, ובמיני זמר, ובטיול הגנות, ובבנינים הנאים, וחברת הצורות היפות וכיוצא בהם ממה שירחיב הנפש, ויסיר חולי המרה השחורה ממנו. והכונה בכל זה - שיבריא גופו. ותכלית הכונה בבריאות גופו - לקנות חכמה. וכן כשיתעסק לקנות ממון - תהיה תכלית כונתו בקבוצו, שיוציאו במעלות ושימצאהו לחושי גופו ולהמשיך מציאותו, עד שישיג וידע מהשם יתברך מה שאפשר לדעתו. ועל זה ההקש יש למלאכת הרפואות מבוא גדול מאד במעלות השכליות והמידות ובידיעת השם יתברך, ובהגיע אל ההצלחה האמיתית. ויהיה לימודה ובקשתה עבודה מן העבודות הגדולות, ולא תהיה אז כאריגה וכנגרות. כי בה נשער פעולותינו, וישובו פעולות אנושיות מביאות אל המעלות האמיתיות. כי האדם שיבוא ויאוכל מזון ערב אל החך, טוב הריח שנפש אדם מתאוה לו, והוא מזיק לו. ואפשר שיהיה סיבה לחולי קשה, או למיתת פתאום - זה ובהמות אצלי שוין. ואין זה פועל האדם, מאשר הוא אדם בעל שכל. אמנם הוא פועל אדם מאשר הוא חי, "נמשל כבהמות נדמו" (תהילים מט, כא). ואמנם יהיה פועל אנושי, כשיואכל המועיל לבד. ופעמים יניח הערב ויאוכל הנמאס, כפי בקשת המועיל - וזה פועל לפי הדעת, ובזה נבדל האדם בפעולותיו מזולתו. וכן כשיבעל כשיתאוה, מבלתי שישמור הנזק והתועלת - יש לו זה הפועל מאשר הוא בעל חי, לא מאשר הוא אדם. ואפשר שתהיה הנהגתו כולה לפי המועיל, כמו שזכרנו, אלא שישים התכלית: בריאות גופו ושלמותו מהחוליים לבד - ואין זה חסיד. כי כמו שבחר זה הנאת הבריאות, בחר זה האחר הנאת המאכל, או הנאת המשגל - וכולם אין תכלית אמיתית לפעולותם. אבל הנכון: שישים תכלית כל מה שיתעסק בו בבריאות גופו והמשך מציאותו על השלמות, כדי שישארו כלי כוחות נפשו - אשר הם אברי הגוף - שלמים. ותתעסק נפשו מבלי מונע במעלות המידות ובמעלות השכליות. וכן כל מה שילמדהו מן החכמות ומן הדעות שישיג.
So, his only design in eating, drinking, cohabiting, sleeping, waking, moving about, and resting should be the preservation of bodily health, while, in turn, the reason for the latter is that the soul and its agencies may be in sound and perfect condition, so that he may readily acquire wisdom, and gain moral and intellectual virtues, all to the end that man may reach the highest goal of his endeavors. Accordingly, man will not direct his attention merely to obtain bodily enjoyment, choosing of food and drink and the other things of life only the agreeable, but he will seek out the most useful, being indifferent whether it be agreeable or not. There are, indeed, times when the agreeable may be used from a curative point of view, as, for instance, when one suffers from loss of appetite, it may be stirred up by highly seasoned delicacies and agreeable, palatable food. Similarly, one who suffers from melancholia may rid himself of it by listening to singing and all kinds of instrumental music, by strolling through beautiful gardens and splendid buildings, by gazing upon beautiful pictures, and other things that enliven the mind, and dissipate gloomy moods. The purpose of all this is to restore the healthful condition of the body, but the real object in maintaining the body in good health is to acquire wisdom. Likewise, in the pursuit of wealth, the main design in its acquisition should be to expend it for noble purposes, and to employ it for the maintenance of the body and the preservation of life, so that its owner may obtain a knowledge of God, in so far as that is vouchsafed unto man. From this point of view, the study of medicine has a very great influence upon the acquisition of the virtues and of the knowledge of God, as well as upon the attainment of true, spiritual happiness. Therefore, its study and acquisition are pre-eminently important religious activities, and must not be ranked in the same class with the art of weaving, or the science of architecture, for by it one learns to weigh one's deeds, and thereby human activities are rendered true virtues. The man who insists upon indulging in savory, sweetsmelling and palatable food although it be injurious, and possibly may lead to serious illness or sudden death ought, in my opinion, to be classed with the beasts. His conduct is not that of a man in so far as he is a being endowed with understanding, but it is rather the action of a man in so far as he is a member of the animal kingdom, and so "he is like the beasts who perish". Man acts like a human being only when he eats that which is wholesome, at times avoiding the agreeable, and partaking of the disagreeable in his search for the beneficial. Such conduct is in accordance with the dictates of reason, and by these acts man is distinguished from all other beings. Similarly, if a man satisfy his sexual passions whenever he has the desire, regardless of good or ill effects, he acts as a brute, and not as a man. It is possible, however, for one to shape one's conduct entirely from the point of view of utility, as we have stated, with no aim beyond that of maintaining the health of the body, or guarding against disease. Such a one does not deserve to be called virtuous, for, just as he strives for the enjoyment of good health, another like him may have as his aim the gratification of eating, or of sexual intercourse, none of which actions leads towards the true goal. The real duty of man is, that in adopting whatever measures he may for his well-being and the preservation of his existence in good health, he should do so with the object of maintaining a perfect condition of the instruments of the soul, which are the limbs of the body, so that his soul may be unhampered, and he may busy himself in acquiring the moral and mental virtues. So it is with all the sciences and knowledge man may learn.