The idea is that making magic items is a complex, high-level skill that can go wrong (or right) with the slightest error. Cook your eye of newt to 162 degrees instead of 161, and poof you end up with something completely unintended, for good or ill. Most mistakes turn into inert waste, a tiny percentage turns out spectacularly, while another percentage turns out kind of useful to somebody, maybe, but a bit weird.
For those items, as in the real world, it is Destination EBay! The magic item maker has to try to recover costs somehow. From there, they enter the loot tables of the world.