Prepositions govern a particular case (or cases). That's just the way they work. It's not like the uses of dative/accusative/genitive where the case alone tells you the function of the word in the sentence.
That said, there is a tendency for the individual cases to be associated with a particular "core" meaning, and this carries over when prepositions are assigned a case to govern.
Dative tends to indicate location (no motion).
Accusative tends to indicate motion towards.
Genitive tends to indicate motion away from.
The first two categories often become conflated in English-- we rely on context for meaning and don"t necessarily use a different word to describe "where" and "to where". Thus, we have:
The cat jumps on(to) the table. (Motion towards the table. Greek would use a preposition + acc here)
The cat is sleeping on the table. (No motion. Greek would use a preposition + dative)
The cat jumps down from the table. (Motion away. Greek would use a preposition + genitive).
The Greek cases are useful because they show nuances of meaning where we have to add extra specification in English. Take the preposition "under" for example:
Accusative: The cat crawls under the table (i.e., the cat is moving in the direction of the table.)
Dative: The cat crawls around under the table (i.e., the cat is under the table the whole time, motion is within a specific space)
Genitive: The cat crawls out from under the table (i.e. the cat is moving away from the table)
If you're not a cat person I apologize; feel free to substitute with different animal of your choice.
IPHIGENIE: Kann uns zum Vaterland die Fremde werden?
ARKAS: Und dir ist fremd das Vaterland geworden.
IPHIGENIE: Das ist's, warum mein blutend Herz nicht heilt.
(Goethe, Iphigenie auf Tauris)