The last hackathon I was a part of was Hacktoberfest 2020, a month long push for open-source and collaboration sponsored by DigitalOcean every year in October. I think some of the big benefits of participating in hackathons are:
1 - Teamwork: it’s great to learn coding and to take your time with the process, but if you are looking to be a professional dev sooner or later you need to get used to working with other people. To ask for clarification when you don’t understand something, and to get past the fear of “sounding dumb”
2 - Other people’s code: contributing to an open-source project means you are most likely not starting from scratch. It’s daunting at first, but being comfortable learning a new codebase, realizing which knowledge gaps you need to fix and finally putting it all together in a meaningful contribution is awesome.
3- Focused motivation: this one is easy. Working on my own I might feel like taking breaks, walking away from things, or leaving it until tomorrow. But when I know other people are counting on me to submit my piece of the puzzle I tend to focus much better and be more productive.
4- Meaningful contributions: sometimes hackathons are all about bringing people with the ability to build tech with organizations that need help like NGOs, animal shelters, and other community-oriented endeavors. It’s a great feeling to know you are making a difference in the world.