The answer is hiding in part of the code you took out. What you've posted is indeed an infinite loop. However, here's a more complete (but still simplified) example, modified from the linked blog post:
function addItemUnbind() {
bind('click', function() {
addItemUnbind();
});
}
The call to addItemUnbind is inside a closure--a new anonymous function that's separate from the addItemUnbind function that created it. Rather than being called right away, a reference to the new function is being passed into the bind function. So if the bind function looked like this:
function bind(eventName, eventHandler) {
eventHandler();
}
then you'd have an infinite loop, because the call to eventHandler would lead back into addItemUnblind. But if it looks like this:
function bind(eventName, eventHandler) {
this.events[eventName] = eventHandler; // save the event handler to call when an event happens
}
then there's no problem. It doesn't call addItemUnbind, it just saves a reference to a function that will call it later on.