Book of Vile Darkness and Book of Exalted Deeds did exactly that, and they were both quite popular and still are among 3e players. Having said that, I'd rather see these as campaign supplements rather than core rules like how 3e had spells with descriptors like good/evil/chaos/law. Putting limits on spells actually enhances a campaign because it delineates boundaries, whether they're magical, cultural, legal, social, economic, or whatever. In fact, the more I think about it the more I'd like to see those kind of supplements published for 5e.