It has to be done at render time because it relies on the current position of the View. Doing it at any other point in time would be pointless.
All the render methods does is to draw stuff, not to update sprites, even if that update takes in account visual elements like pixels or the view. If you want a background sprite to accompany the view position by wrapping it every time it becomes out of the view, that must be done before its render method is called.
In other words, you should have a class handling the background and update it accordingly to current view position before drawing it.