What you seem to be assuming is that their is only one work. If you contact a programmer to make you a specific program you are paying for the creation and license of that work. You own a copy of that work. The programmer owns the work.
If you did not get the copyright from the photographer taking wedding photos, they could not come to your house and take the pictures of your wedding off your wall. You own those copies, just as you own a copy of the software written for you.
If a competitor of your company wants the same software made by the same programmer there is nothing stopping that programmer reusing the code they used to make yours and adjusting it to fit your competitor's needs and be well within his rights to create a derivative work based on something he owns the copyright to.