I’m kind of an introvert so I hate hackathons but did one and had about 75 code for a day. My boss wasn’t happy but I was surprised at the fun culture and connections created across teams. Five years later people mention something they learned or a technique they use or someone they met that they continue to work with.
I don’t think these competitions are the best mean for solving specific problems, though think they are part of a good portfolio.
I think that they are valuable for other purposes like communication and interoperability.