The foremost aim of a scientist, as of
any man who seeks to behave with objective
morality, should be to seek his own gain and
advancement via the discovery of truth.
Since it is that particular scientist's mind
that gains perception of natural phenomena
before the minds of any others, that
particular scientist deserves ample rewards
for his ingenuity, deliberation, and
integration, and/or experimentation. To give
this knowledge away without demanding one's
rightful recognition and reward is to
subordinate this wonderful capacity to a
parasitic humanity that would not have
discovered this truth on its own but would
nevertheless seek to own it.
Science and truth should not be pursued for their own sake as they, like everything else, do not have intrinsic value. Their pursuit should be undertaken solely for their contribution to the objective survival and prosperity interests of man, and most importantly the interests of the discoverers. To renounce this precept and gratuitously give away one's knowledge classifies as pursuit of science for science's sake and thus subverts the genuine purpose of science.
Payment for one's discovery, of course, can proceed in a myriad of ways, and should be left to the individual scientists to define in relevant situations. Monetary gains may be preferable for some, while sheer association of one's name with a discovery may suffice for others.
Hence, before their research is completed, scientists possess the prerogative of maintaining any degree of secrecy that they deem necessary for the most optimal progress of the endeavor. Since the investigation is their labor and therefore their property, not that of the public or of humanity, the scientists can and should set the terms of its disclosure.
If sharing of results is detrimental to the profit and recognition that those scientists expect to derive from their studies, then they have a moral obligation to themselves not to reveal them. If, however, there is no such detriment, they should be free to receive consensual assistance and feedback as they see fit.
But no scientist should be obligated to do so, either legally or morally; such disclosure ought to remain a matter of individual free choice.