There are times when it's very useful to have programmatic bindings for diagrams, I've used them multiple times when I want to create a diagram that represents the structure of some code, auto-generate a state machine diagram based on the code, etc. These are very handy because you don't need to keep documentation up-to-date.