something called magic
They stitch them in.
Not true, though it can look like they did. They use pre-prepared sets of 24, labeled A through X where the pre-printed passport has page numbers, in which the pages are stitched in advance to a strip of tape about 2" wide that's covered with peel-off paper on the outside (the sticky side). They remove the peel-off paper and press the whole set down between two original pages. (Per regulations, they can't tape a new set to a previous set of taped pages.) Takes seconds. It took me longer to fill out the very short, simple form they asked for at the time.