I've heard it said many times regarding Chumash and Gemara that Rashi comments only when there is a technical problem with the text, and isn't offering analytic answers to "why" questions. I'm wondering if there are any Achronim who make this observation/claim explicitly. Thanks!
Rashi himself wrote about his approach and stated he was only trying to explain the simple meaning of the verse, and he would quote agadda that would settle the meaning of the verse.
See for instance in Bereishis 3:8
וישמעו. יש מדרשי אגדה רבים וכבר סדרום רבותינו על מכונם בבראשית רבה (יט ו) ובשאר מדרשות ואני לא באתי אלא לפשוטו של מקרא ולאגדה המישבת דברי המקרא דבר דבור על אפניו.
In fact, Ramban in Noach 8:4 uses Rashi's approach as an allowance for his own attempts to explain the text without the words of Chazzal
אבל כיון שרש"י מדקדק במקומות אחרי מדרשי ההגדות וטורח לבאר פשטי המקרא הרשה אותנו לעשות כן כי שבעים פנים לתורה (אותיות דרבי עקיבא) ומדרשים רבים חלוקים בדברי החכמים.
And of course there is the famous Rashbam in the beginning of Vayeshev stating Rashi had intended to redo his commentary with an even stronger focus on the simple meaning.
I would like to begin with what Rashi himself says (as mentioned in the first answer). He says:
I have only come to (arrive at or help explain) pshuto shel mikra, the plain meaning of the text, and to (bring at times) the agadic works that settle the words of the Torah, each word in its place.
Rabbi Tuvia Bloy in the sefer כללי רש"י - Klalei Rashi, the principles of Rashi, explains that the commentary of Rashi has one goal, namely: to give the peshat-meaning (simple meaning) of a posuk. Rashi also wants to eliminate any difficulty that may arise for a student, in understanding a posuk. This is why Rashi passes over the more analytical insights. He won't give them, because Rashi tends to give commentary that a "five year old can understand", as the Rebbe writes many times.
On page 75 of sefer כללי רש"י, the author explains that in his commentary, Rashi does not tend to give answers that goes deeply, in great detail, in explaining a posuk. That is why, on Bereishis 3:8, Rashi points out that he came to explain the posuk according to the most simple meaning.
In כללי רש"י it is also explained, and it builds on the fact that Rashi writes commentary that even a "five year old" can understand, that Rashi does not answers "why" questions, because a five year old does not come up with that sort of questions (usually).
רש"י מפרש את המקרא כך שהוא מבאר ומסלק כל קושי בפשוטו של מקרא ולפי זה רש"י עובר בשתיקה על ענין מסויים או קושי בולט כאשר פשוטם של דברים מובנים למעיין אם מידיעה טבעית וסביבתית ואם מפסוקים קודמים או פירוש קודם של רש"י Rashi interprets the Torah in such a way that it clarifies and removes any difficulty in the simplicity of the Torah itself. According to this, Rashi passes over a certain subject if it can be understood by the simple meaning of it.