I'm having a little trouble understanding what this function does:
canvas.create_window(0, 0, anchor='nw', window=frame)
since usually app=tkinter.Tk() gives a type of Tkinter.Tk, and is for all intents and purpose a window and a handler into the window instance, what does create_window create?
And, from this code, it seems like create_window hooks a Tkinter.Frame into the window and the return type for create_window is an int. You can put a frame in a canvas so why create_window? And does the returned int mean anything?
what does create_window create?

It creates a canvas object, similar to a line, rectangle, image, etc. Like a line or rectangle, this canvas object has attributes that define what it looks like. In the case of a window object, one of the attributes is window which specifies a widget to be displayed as the object.

You can put a frame in a canvas so why create_window

If you add a frame in a canvas with pack, place, or grid it will appear inside the canvas but it won't be part of the canvas. That means that if you attach scrollbars to the canvas, the frame will not scroll. By using create_window, the frame becomes part of the canvas, and can be manipulated and scrolled like any other canvas object.

And does the returned int mean anything?

The value returned from calling create_window is an integer index which can be used later to refer to this object.
tkinter what is a window when calling tk.canvas.create_window()