As a services provider, sometimes I see things that clients don't. Namely that when a reputable client hires what they think is a reputable development firm, especially one that creates portions of the work overseas, they don't actually own the code they paid for - yes, this could be you.
Code ownership when procuring development services is a major issue. I'm writing this to alert those clients to whom this would be a real issue. What I see happening is this:
Big Company ABC hires Agency XYZ. They have a contract that says that Big Company ABC will own the code. So far, so good.
Agency XYZ hires US firm Madmania who offers competitive pricing on the development because much of it, if not all of it, will be done overseas (to pick a place, say in Paraguay). Agency XYZ has a tight a contract where Madmania gives all rights to code to Agency XYZ (who in turn gives it to Big Company ABC). Still, everything seems to be running smoothly.
This is where it breaks down. Madmania probably does not actually have an office in Paraguay. So how does it hire the developers? It most likely has a US contract with each developer which is not enforceable in Paraguay, even if it says that it is a worldwide contract. Since Madmania is a relatively small services firm, it doesn't take time to check formalities and, since no client has ever raised an issue, it doesn't take the time to look into international contract laws. In fact, Madmania may not even have an attorney on retainer (usually, the owner thinks he/she is perfectly capable of creating sufficient contracts and thinks that informal contracts are part of being a savvy entrepreneur). So while $500/hr attorneys negotiated the contracts at the top, a couple layers down the funnel, things aren't quite as polished and formal.
Most countries follow their own formalities as to how contracts are properly created so they are enforceable. Most of the time, a contract signed with electronic signatures and sent over scan/email simply is not enough to allow copyright or inventions ownership to be properly transferred from author to purchaser. While in the US a signature is valid unless you can prove it was forged, the opposite is true in the majority of the rest of the world (your contract is not valid unless it has real ink and a real ink notary stamp). I have seen various versions of this kind of scheme and in the end, it can get very confusing with multiple companies and countries in between you and the developer. What usually ends up happening is that ownership of the code was never properly transferred all the way up to Big Company ABC either because a contractual relationship is altogether missing in the middle of the chain or because something in the contract is not truly enforceable.
So why do people do this? Wouldn't it be easier and simpler for everyone involved to just have contracts that clearly pass ownership along and are enforceable?
Simple: it saves money – big time. Having an offshore office owned by a proper US company creates a lot of overhead cost. There are a lot of legal fees which need to be incurred for this to be properly set-up and without the proper set-up, even having contracts doesn't, in most cases, mean that you actually own the code.
Perhaps you can look the other way and hope no one ever really asks (which is what I see most companies do); however, I strongly encourage you to demand all the paperwork from your vendor to ensure that you indeed own the code you pay for and to avoid issues later. If you don't like what you see or seem to be getting the run-around from your vendor, it may be time to start looking for a vendor that has all the proper paperwork in place for offshore development.