I think that copyright law makes illegal the act of distributing code without a license, and perhaps the act of receiving that distribution or enticing that distribution (i.e. starting a download) in some jurisdictions.
I don't think the law is concerned with you merely owning a copy of some copyrighted work, except as proof that the above actions took place.
Of course if you signed a contract as part of receiving the copyrighted work, then you would be bound by it in your actions relative to the received copyrighted work.