Sometimes the best way for a designer to communicate their vision is to code something up so that their colleagues can interact with the proposed behavior, rather than just see still images. The goal of such code is not the same as the goal of the code that coders write. The code isn’t for deployment, but for design. It’s purpose is different. It has a different responsibility. It’s code, but not the same as code as from a programmer.