I see it as a double standard, unless there are magic items with martial class restrictions. For example, a vorpal blade can only sever a limb with the appropriate investment in martial levels. Otherwise, it is just a sharp pointy blade for the untrained.
They're generally already restricted by weapon/armor proficiencies. Your wizard isn't going to be able to use a sword of sharpness properly, because wizards don't fight with swords. And martial classes have other benefits when it comes to using magic weapons, notably the Extra Attack feature - a Cleric of War might be able to use a vorpal sword, but a high-level (11+) fighter gets to use it three times per round.