Beis din shel mato have to be 100% sure that the guy knew what he was doing and that he didn't forget the warning/didn't know what he was doing was bad, hence one needs warning תוך כדי דיבור (within the time of a greeting to ones teacher) to warn the guy prior to his sin as quoted in Kesubos 33a. Otherwise they'd punish someone who forgot the warning which is unfair.
The reason why we have to be so sure is learnt from Kesubos 15a: ספק נפשות - דיני נפשות להקל דהא והצילו העדה כתיב- במדבר לה- death sentences are judged favourably since it is written in Bamidbar 35:"The Congregation (sanhedrin) shall save" (note that Malkus (lashes) in this regard is a punishment which has the same laws as death sentence either because it weakens the person like death מה לי קטלא פלגא מה לי קטלא כולה Bava Kama 65a or there is a Hekdesh between Malkus and Misa. Tosfos Yeshanim Kesubos 36b).
However Hashem knows everyone's inner thoughts and intentions when they sin whether they "forgot" that they were doing something wrong or not therefore Kareis and other divine punishments can be implemented on a willful sin. If the guy forgot, Hashem will not implement kareis. And if the guy remembers then Hashem knows he did it on purpose and will punish accordingly.