I have always included clauses to transfer to my clients full author, ownership and use rights for all the source code, original images, original resources, etc. I develop/create for them.
Of course, I retain author, ownership and use rights for my libraries and I usually do not include source code for those. If the client requires my library’s source code, then I ask a premium for those and I provide them with the proper use license and I include the needed restrictions on allowed use.
I really see not the need to retain rights for myself or my company. A client’s work is just for them. I never reuse code (even if I have to write some process again, I do not see it as code reuse).
Why lots of companies/programmers retain author, ownership on commissioned work?