There's a scenario that's been rattling around in my brain for a while. Consider the following example.
Josh, at Widgets Tech, goes to the internet and finds some code (GizmoLibrary) licensed MIT, and uses it in their code. A year or two go by, and GizmoLibrary has become deeply intertwined with almost every section of Widgets Tech's codebase. Abruptly, Widgets Tech gets an angry email from Gadget Corp. Turns out, the person who put GizmoLibrary on the internet had no authority to do so, and Gadget Corp (the owners of the code) have no intention of letting anybody else use their proprietary code, paid or otherwise. Widgets Tech doesn't have the resources to rewrite their whole codebase from scratch; if GizmoLibrary goes away, they're going under.
What happens? It doesn't seem like Widgets Tech has done anything wrong - they had no way of knowing that code was improperly licensed. It seems bad for Gadget Corp to be able to pull the plug on them. (And indeed, it seems like there's a possibility of abuse, here - "accidentally" post code where a competitor might find it, then pull it from them, costing days of work or more. A little tricky to pull off, but I don't doubt that more complex shenanigans have occurred.) On the other hand, Gadget Corp does own the code, and in theory they can decide who gets to use it. Is there any clear ruling on this? Let's assume United States, since that's where I live.