I think which one you use depends on what you are trying to say. In other words, it's context-dependent.
Neither:
a game with an educational purpose
nor:
a game for an educational purpose
is a complete sentence, so it's impossible to say which one should be used.
The preposition with means you are talking about something instrinsic to the game; for example:
Monopoly is a game with an educational purpose. It teaches young children how to make change.
while the preposition for is used when describing a reason for doing something:
The teacher let his students play Monopoly for an educational purpose; he wanted them to practice making change.
Neither of those sentences is incorrect, or better than the other. One is talking about the game itself; the other is explaining why a teacher used a game during class time. The two very different situations each work better with a different, more suitable preposition.
Incidentally, I noticed a lot of your recent questions tend to go something like this:
Which is better: This with X, or That with X?
where you are actually using letters like X & Y in your question titles. Such questions are often difficult to answer because the answer may change depending on what X is – as happened in this question. So, please remember, English rarely works like algebra, and getting the right wording is rarely as formulaic as an algebraic function.
