The solution was what I thought it to be.
But it is not weird. Both https://html.spec.whatwg.org/multipage/webappapis.html#animation-frames and https://www.w3.org/TR/animation-timing/#dfn-animation-frame-request-callback-list do not specify that in a opposite way than it is implemented.
You provide rAF with a callback that is called before a frame is drawn. Before a frame is drawn frame callback list is picked and replaced with an empty one and those picked callbacks are run. Pushing new callbacks to the queue inside a callback will result in functions being added to that new list and called before next frame is drawn.
Maybe not most intuitive, but still accurate.