Unless agreed otherwise, a company contracting you does not have the right to build off your code without your permission - they have an implicit license to use your code for the reasons they expressed to you, and no more.
This is an important part of contract negotiation.
If a company wants the right to use what I built for them, they pay one price. I find it helpful to make it explicitly clear exactly what we are agreeing.
If they want the right to my code, there are several disadvantages for me: I could lose potential future work from them, and I lose some competitive advantage gained from my past work and skill that's gone into that, and I might lose the right to reuse my own code.
They will normally pay a much higher price to cover that disadvantage, depending on how thoughtfully this is negotiated and the nature of the work.
This is different from employed developers, who give up their copyright to the employer (again, by default).
In my experience, freelancers in creative fields tend to be very aware of this situation and apply it skilfully.
If Nike started using the swoosh in a way which they hadn't agreed upfront, the designer has a definite copyright claim there, and both parties ought to have known this when she first agreed to do the work. Indeed, the article reads like they later paid her off with shares.
This is my understanding from the UK; I am not a lawyer.