We follow a policy to transfer the complete code ownership to the respective client once the project is delivered. We mention it clearly in the agreements that we sign before commencing the projects.
The client of our Magento development agency will become the sole owner of the code files, thus ensuring that events like reuse or misuse of the code written for your store never happen.