I was going to say that would almost make things worse: right now these sorts of bugs are discovered by attempting to re-implement the described algorithm, and discovering that the described algorithm was wrong. If the code was available but wrong, most people would just run the code and find the same wrong answers as the original researchers.
But actually I think that's wrong; far more people would run the code than currently try to re-implement the code; and it's likely that someone will notice something fishy about the code and report it.
This is standard practice in some fields. I'm helping an old colleague with one of their projects, and one of the requirements for publication is documented runnable code and all of the underlying data.
I'm still surprised that this isn't expected in other research areas.