Recently I was asked to create an entire application that included a
set list of features. When I was explaining this to my husband, he
immediately became incredulous and accused the company of using
interviews so steal code from developers, especially when asked to
provide a complete working program.
To put it in one word: nonsense. The code provided by job applicants universally lands in the same place as does the CV after the hiring process is over, and that's either some archive for future reference or a trash bin.
The amount of work it would require to include testing-code into production product is, almost always, is magnitudes higher than it would take to add/write said feature within the existing ecosystem. And that's based on the assumption that your solution on its own is production-ready and only needs integrating, which is rarely true for interview code.
The reason why more and more companies finally wake up and use real-life problems for their coding challenges, instead of abstract stuff like codility, is very simple - this way you are testing how you will handle something similar to their day-to-day solutions, instead of very abstract and work un-related (most of the time) issues offered at automated-testers.
This is something I've been championing myself for years, and it's a fantastic way to weed out all sorts of copy/paste applicants, allowing you to focus more effort and time on those who truly care about the job.
I am so used to coding online, whether while testing for personal
improvement or in an interview, that I had not even considered who had
access to my code, if it is being used for any other purpose, or
whether it is even valuable.
It's virtually worthless and for every job ad they will receive dozens of solutions (the actual number varies on many factors, but the point is they will get multiples of them).
Is it a common theory that developer interview answers are stolen?
What kind of protection is available or are there any assurances
developers should look for while interviewing?
Never heard of a single instance of that happening, 1st or 2nd hand. And I worked with about ~15 IT companies/software houses in a span of almost two decades now. Never even heard it suggested for the previously explained reasons.
If something that you've created for an interview is, in your mind, of such profound value to you then I would suggest that you open up a GitHub repository and publish it there. Make sure to rework the task it relates to and put the modified version in the readme, so some future candidates won't find it by googling the task. Then even if you won't get the job, you have a new, and sexy, entry into your portfolio out of it.