Trading cards like these are printed on large uncut sheets, with usually more than 100 cards to a single sheet. There are multiple different sheets for any given set, usually separated by rarity.
This way when the cards all get cut out of the sheet, the packager is able to control how many cards of each rarity will end up in a single pack together while still being somewhat random.
Latest Answers