> The paper itself is enough to reproduce all the results.
No, this is almost never the case. It should be. But it cannot really be. There are always more details in the code than in the paper.
Note that even the code itself might not be enough to reproduce the results. Many other things can matter, like the environment, software or library versions, the hardware, etc. Ideally you should also publish log files with all such information so people could try to use at least the same software and library versions.
And random seeds. Make sure this part is at least deterministic by specifying the seed explicitly (and make sure you have that in your log as well).
Unfortunately, in some cases (e.g. deep learning) your algorithm might not be deterministic anyway, so even in your own environment, you cannot exactly reproduce some result. So make sure it is reliable (e.g. w.r.t. different random seeds).
> In my field many scientists tend to not publish the code nor the data.
This is bad. But this should not be a reason that you follow this practice.
> clean and organize the code for publishing
This does not make sense. You should publish exactly the code as you used it. Not a restructured or cleaned up version. It should not be changed in any way. Otherwise you would also need to redo all your experiments to verify it is still doing the same.
Ok, if you did that as well, then ok. But this extra effort is really not needed. Sure it is nicer for others, but your hacky and crappy code is still infinitely better than no code at all.
> it will increase the surface for nitpicking and criticism
If there is no code at all, this is a much bigger criticism.
> publishing the code will be removing the competitive advantage
This is a strange take. Science is not about competing against other scientists. Science is about working together with other scientists to advance the state of the art. You should do everything to accelerate the process of advancement, not try to slow it down. If such behavior is common in your field of work, I would seriously consider to change the field.