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.