Same reason you give trophies to Little League participants - to provide context for the competition. To add something fun that hopefully underscores what is effectively a networking/show-off event.
That's a very good question, and one I wish more hackathons would consider. I've seen one hackathon give prizes at the end totally at random, and some that don't do prizes at all.
You don't define a win state. The event handlers do. Your goals will be different from the event handlers goals. And that's fine. You should have different goals.