In parasahas Eikev (Devarim 11:18), the Torah instructs us that we:
shall lay up these my words in your heart and in your soul, and bind them for a sign upon your hand, and they will be as frontlets between your eyes.
There is a famous Rashi on this posuk, where he explains that this means:
Even after you have been banished make yourselves distinctive by means of My commands: lay Tephillin, attach Mezuzoth to your doorposts, so that these shall not be novelties to you when you return.
Shouldn't the reason why we need to follow Torah and the mitzvos be in order to a) follow Hashem's will, b) make ourselves a better person? G-d asks that we follow His Torah. Shouldn't that be enough reason to observe the mitzvos?
Why does Rashi says that we need to "lay up these words in our hearts", in order that, when we arrive in Eretz Yisroel when Moshiach comes, we know what to do, we know how to put on tefillin etc...
The question is whether Rashi's reasons for observing these mitzvos invalidate doing them for the obvious reasons mentioned above.
On a side note, the Piaseczno Rebbe in Aish Kodesh writes that the reason why the Torah was not given in Eretz Yisrael was to give the message that the Torah can be observed everywhere, not only in Eretz Yisroel, hence it was given in the dessert.
לכן אילו קבלו ישראל את התורה בארצם בארץ ישראל היו חושבים שרק במקומם ובביתם אפשר להם לקיים אותה ולא כשהם בגולה ומטורדים לכן נתן ד' להם התורה במדבר בדרך וטלטול שידעו שבכל מקום צריכים לקיימה כנאמר לעיל שלא יהא לבך חלוק על המקום
This all made me wondering if this Rashi does not contradict the fact that we keep mitzvos is because Hashem said that we need to observe them.