Humans are very very good at gaming systems. So, if you have rules of magic that it must obey, then you can accurately game it. Gamers are very good at it.
So, you can either make a system that has a random element for the effects or have no system at all and use ad-hoc decisions as to what happens. I favour the latter as I run systemless games. I leave it to the story, the players' wishes, and general feel of the world to dictate what is right for this particular occasion.
For example, the PCs found an elven sword (MERP). It was attuned to water, and thus the more flowing and water-like the player's description of attacks and defences were, the more the sword would "help". No fixed bonus, no super powers, just a better sword which could with the right attacks slice an orc in two hight-wise. It did have other neat features but none relevant here.
In system terms, you could have a random process shaped like a thine bell curve (low variance) so that most of the time, the effect of spells/items/whatnot are the same. Sometimes, you will get much more powerful spell/effects and sometimes they will be much weaker. While this adds randomness, you can have that randomness as part of your mystery. In your example, detect magic would be cast (say it was a good result): The character detects that the wand can heal wounds and that the creator made it because they lost their family to injuries. Now, every time they use the item, they can feel the pain and bitterness of the maker at his lost and his oh strong will to save others from his pains. Now, say you got a bad roll. The detect magic works but now the item's magic has been violated and so instead of a pleasant heal, it is painful and just plain nasty. Not something you want to be healed by.