German uses the accusative for definite time expressions, both for durations ("Ich mache es den ganzen Tag") and points in time ("Ich mache es nächsten Samstag"), and the genitive for indefinite time expressions ("Eines Tages").
Classical Latin also uses the accusative for durations.
What are the etymological reasons for this usage of specific cases without pronouns for adverbials? Any other languages where this happens?