Here, the first 20 tabs are added fine, as MainLoop hasn't started yet, but the later tabs don't show up.
They do, but your window is too small to show them all. If you resize your window, and make it wider, then you'll see them (you have to do this quickly since your code exits when it's done).
Having said that, Tk::NoteBook is severly limited: You can't place tabs except at the top, and you can't have multiple rows of tabs, which would have solved your problem. There is an alternative widget, Tk::DynaTabFrame, which attempts to overcome those problems.