They also get to demonstrate their way of doing things in public, which in a field as active and mercurial as frontend web development has value in influencing where changes go. If they have a particular solution to a problem that's not well-solved elsewhere, they can influence the world to follow their approach to solving it (or at least not pull the rug out from under them) instead of going a totally different way and turning their code into technical debt.
* They build it for internal use, primarily
* They use it for advertisment (hey ING bank would never be mentioned here otherwise)
* They can eventually use it for recruiting (send high quality PRs, they might like you)
* If they are lucky they get cheap bug fixes (not free, as review and community work costs time)