True the architect has no rights over the building, but he didn't create that, he created a design and drawings used to create the building from. The question is does he have rights over the drawings? (i.e.: can he use them again, selling to another client because he retained ownership and licensed you a copy, or can he not, because he transferred the ownership of the design to you?). Most don't transfer the copyright of the design to you (ie: you can't make more copies of the drawings and sell them, but he can).
Another common example that exists in the real world is professional photography. You hire a photographer to take pictures at a wedding, paying him for his time to do so. However, you don't own the rights to the photographs he's taken. You can buy copies from him, but he still owns the copyright. As a result, you cannot legally make more copies of those photographs. Photographers generally want additional fees to transfer the copyright of a photo, because it means: 1) you can get copies made elsewhere cutting them out of that profit stream and 2) they can't use it in their portfolio of existing work they show to potential new customers.
Most software consulting is done on a "non-exclusive, unlimited royalty-free license" basis. You have unlimited use of the source code created for you, and the programmer generally retains rights to use that code again in other projects. Most programmers have a lot of "stock code" they've already written, and grab chunks of it to throw into their projects so they're not constantly reinventing the wheel for simple stuff. Some of the new code they write for you is likely to end up as snippets added to that collection. Take a snippet, leave a snippet.
You can set up contracts that transfer 100% ownership, but that's going to increase their billed hours and your cost (because they won't be able to use any of their existing snippets and must create everything from scratch). But if that's what you want, most are willing to set that up. However, most customers want a lower cost so the typical consult is not written up that way.
The moral of the story is, if you want specific terms, make sure they're in the contract you sign.