You get a group of hackers who are hacking for good and want to share the idea and code with the world are more inclined to use the “creative Commons” clause which means that anyone can use their idea and build upon it. Think Tesla releasing all their patents. ie:

Corporate hackathons will often have a clause that states that during the hackathon anything you make no longer belongs to you and is the property of the sponsor of the hackathon.

Government Hackathons often have good intentions but dont have the skills post the hackathon to implement the solution. For the hackathon to work a team who can see the innovation or idea through is critical to the success. Take a look at