I am inclined to agree with Ian. The code was more than likely the result of hard work and long hours, and yes, I am also of the opinion that it is intellectual property and it should be copyright registered. I liken this matter to that of a composer who composes a song that has the potential of widespread appeal; given the various formats in which the music could be downloaded and made available, if this creation, a.k.a. intellectual property were not copyright-protected, there is the potential of losing a legitimate revenue stream.
In short, the developer could release the code for the common good--but only after it has been copyright registered. It's called giving credit where credit is due.
1. Its her intellectual property. It may be copyrighted. Besides, She can do with it as she pleases.
2. Someone may use her code, rewrite or extend her work and publish in a predatory journal. I have suffered that consequence.
3. Validation : When someone implements your design, and the results you proposed match theirs, the credibility of your work is validated.
It's not about being "scared". I suppose you raised this query because some authors refused to share their code. And I am glad they did not spoon-feed you and encouraged you to implement their work and learn while you are at it. This exercise will offer you a deep insight into the problem and you might even come up with ways to improve upon their technique.