First, if you host your code on GitHub, it is straightforward to assign your repository a DOI and thus make it more easily citeable: you can read about how to do this here. This makes linking a published article and the code that was used in it very easy; "back-linking" is still a challenge (ie, visitors to your github page do not automatically know which papers used your code).
Both of these ideas really rely on an open-source approach to research computing. I consider my code and its development history a necessary "trust-but-verify" component of my work, so it seems natural to have it publicly available at time of publication. While that opinion is not universal, tools like the Jupyter Notebook, which is "a web application that allows you to create and share documents that contain live code, equations, visualizations and explanatory text.", provide researchers with a fast and easy way to share results quickly and provide a fast verification step. In this way, researchers can keep pace with the rapid progress of a competitive research field, without fully releasing their code until it's ready, while still giving their peers a deeper look into their results than can normally happen with, for example, static figures in a publication.