Together you can learn more than on your own
During a hackathon, you can work together with others on topics that normally don't get enough attention. Even better, by applying techniques like pair programming, mob programming and TDD, you are guaranteed to learn faster than you normally would.