Our Rabbis taught: "Give now honor to the LORD" (Joshua 7:19). "Now" (na) is nothing but an expression of request. When the lot fell upon Achan, Joshua said to him: With a lot you come against me? You and Eleazar the priest, you are the two great ones of the generation; if I cast a lot upon you, it would fall upon one of you. He said to him: I beg of you, do not cast aspersion on the lots, for the land of Israel is destined to be divided by lot, as it is said, "Surely by lot shall the land be divided" (Numbers 26:55); so give Him thanks. Ravina said: He bribed him with words [appeasing him]. Do I ask of you anything but a confession? Give Him thanks and be dismissed. Immediately, "And Achan answered Joshua and said, I have sinned against the LORD" (Joshua 7:20). Rabbi Chama bar Chanina said: This teaches that Achan trespassed in three bans, two in the days of Moses and one in the days of Joshua, as it is said, "Truly I have sinned against the LORD, and thus and thus I have done" (Joshua 7:20). Rabbi Yochanan in the name of Rabbi Eleazar bar Rabbi Shimon: Five, four in the days of Moses and one in the days of Joshua, as it is said, "I have sinned against the LORD, and thus and thus I have done." And until now, what is the reason he was not punished? Because they were not punished for hidden things until they crossed the Jordan, as it is said, "The hidden things belong to the LORD our God, and the revealed things to us and to our children forever" (Deuteronomy 29:28). Why are there dots over "to us and to our children" and over the ayin of "forever"? It teaches that they were not punished for hidden things until they crossed the Jordan; these are the words of Rabbi Yehudah. Rabbi Nechemiah said to him: But did He ever punish for hidden things? Has it not already been said "forever"? Rather, just as they were not punished for hidden things, so they were not punished for revealed punishments until they crossed the Jordan. But then why was Achan punished? Because his wife and his sons knew of it.
Give Honor to the LORD and the Hidden Things at the Jordan
Yalkut Shimoni on Nach 18:5
תנו רבנן שים נא כבוד לה' (יהושע ז, יט). אין נא אלא לשון בקשה, בשעה שנפל הגורל על עכן אמר לו יהושע בגורל אתה בא עלי אתה ואלעזר הכהן שני גדולי הדור אתם אם אני מפיל גורל עליכם על אחד מהם הוא נופל, א"ל בבקשה ממך שלא תוציא לעז על הגורלות שעתידה ארץ ישראל שתתחלק בגורל שנאמר אך בגורל תחלק הארץ ותן לו תודה. אמר רבינא שחודי שחדיה במילי כלום מבקש אני ממך אלא הודאה תן לו תודה והפטר מיד ויען עכן את יהושע ויאמר חטאתי לה'. אמר רבי חמא בר חנינא מלמד שמעל עכן בשלשה חרמים, שנים בימי משה ואחד בימי יהושע שנאמר אמנה אנכי חטאתי לה' וכזאת וכזאת עשיתי. רבי יוחנן בשם רבי אלעזר בר' שמעון חמשה ארבעה בימי משה ואחת בימי יהושע שנאמר אנכי חטאתי לה' וכזאת וכזאת עשיתי. ועד השתא מאי טעמא לא איענוש לפי שלא נענשו על הנסתרות עד שעברו את הירדן שנאמר הנסתרות לה' אלקינו והנגלות לנו ולבנינו עד עולם למה נקוד על לנו ולבנינו ועל ע' שבעד מלמד שלא נענשו על הנסתרות עד שעברו את הירדן דברי רבי יהודה, א"ל רבי נחמיה וכי ענש על הנסתרות לעולם והלא כבר נאמר עד עולם אלא כשם שלא נענשו על הנסתרות כך לא נענשו על עונשים שבגלוי עד שעברו את הירדן אלא אעכן מאי טעמא איענוש משום דהוו ידעי ביה אשתו ובניו: