Not a bug, works just like it should.

from the manpage of bgerror(n):
"When Tcl detects a background error, it  saves  information  about  the error  and invokes a handler command registered by interp bgerror later as an
idle event handler."
^^^^^^^^^^^^^^^^^^^

...and Tcl_DoOneEvent(3) states that idle callbacks are processed only once there are no other events to process.

In the example, the event loop never gets a chance to do idle callbacks (and bgerror _is_ an idle callback) because there's always a [fileevent readable] event.