Are you sure it is the polling for events that is causing high CPU usage? Typically, unless there is something put in there to intentionally slow it down, the CPU of your computer will run any program as fast as it can. Like most game loops, that hello world code uses what is essentially an infinite loop to keep it running. It will just spin in that loop as fast as it can because it has no reason not to. This usually will result in one of the cores of your CPU being utilized to almost 100%.
Most games will add something to allow the CPU to take a break each loop of the game logic or so. A good place to start may be to to enable Vsync or lock the framerate to some value. See the
official tutorials on controlling the framerate Having said that, I don't know anything about GLFW to know why that linked example uses so little CPU. Maybe vsync is enabled by default?