Luke points out:
I'd imagine that in a world where magic would actually exist an enchanted sword would sometimes need maintenance or recasting of said enhancement - especially after heavy use.
Most RPG's both pen and paper or computer based do have some restrictions on magic items that zap things, or cast spells themselves. Wands and staves usually have "charges" and once you drain them you either have to wait till they recharge or the item is simply spent and must be re-enchanted or discarded.
Additive or buffing items (like the Mighty Sword of +1 Strength) usually never get depleted however. They probably should.
There's an interesting counterpoint for these statements: since magic is itself imaginary, why does it have to follow a particular set of rules? Who are we to say that magic power requires maintainable? Some would argue, further, that magic doesn't need to seem real in fantasy fiction - after all, isn't that missing the point?
To me, it's a question of believability. Magic isn't real, of course. If an author wants to go for believability, created a feeling of this-could-really-exist, then drawing real-world parallels is more important. So a magic sword running low on batteries, so to speak, can be more believable than a magic sword that never runs out of power. Everything in our world is governed by rules - magic should be the same, to a certain extent. (All fiction bends real-world rules to serve the plot, as necessary)
The importance of believability depends highly on the story; in epic fantasy (along the lines of Lord of the Rings) treating magic from a perspective of realism is a bad idea, but in contemporary fantasy this is more important.
Luke comments further:
As for cast spells many systems require skill checks before casting and have miscast effects which work similar to "fumble" rules for physical skill checks.
In most games I played the duration of spells that can be cast by PC's is strictly defined and the caster must periodically renew the spell to keep it in action.
Spell 'durations' are something familiar to anyone who's played a fantasy videogame or tabletop role-playing game; they exist because strict boundaries on character power are required to make the game fun. (Fumble rules - rules for what happens when someone screws up casting an in-game spell - are there primarily for entertainment value.) This is a principle generally ignored in fantasy fiction itself, though; usually the writers just "handwave" how the magic powers of magicalness actually work. If someone is unaffected by a spell, for instance, it's because he or she is "too powerful". If someone fails to accomplish something with magic, it's because they "weren't powerful" enough".
Certain fiction series attempt to establish "power levels" for characters, which are inevitably fudged or ignored soon afterwards. Notably, in books based on RPGs, rules for spells are generally ignored as convenient for the plot.
I've yet to see an effective set of (non-mystical) rules governing magic outside of fantasy games. The closest we get is the Midichlorian Explanation (also referred to as Doing In The Wizard - warning, clicking that link may ruin your life), where the question of Where Magic Comes From is answered using technobabble, science fiction style. All this usually does is annoy readers/viewers (see fan reaction to the new Star Wars movies explaining that the Force comes from "midichlorians"), and rarely affects how magic is used in the story anyway.