Yes, that's how it works . . . depending on the work contract you sign. It's not uncommon in creative industries, and even other industries as well.
I'm a school teacher, and technically, any curriculum I develop belongs to my school district, due to the employment contract I signed.
The idea...