Yes, it just dawned on me. Which came first? The preposition or the cases? (Probably another wrong question, but what the hay.) Preps and cases exist in the oldest recorded IE languages. Cases go away in some of those languages as we get closer to modern times. Prepositions remain, however.

One theory about cases is that they started as clitics (i.e., separate words or particles that through loss of accent became fused to the words after them or before them).