As far as I am aware, the rarity of Magic: The Gathering cards is determined by how many times a given card gets printed, relative to other cards in the same set. I believe the standard distribution is for every 120 cards, you get 1 mythic, 7 rare, 24 uncommon, and 88 common, with cards of a given rarity equally likely to appear. This, in turn, determines how likely you are to pull a given card from a randomized 15-card booster pack.
Commander cards aren't sold in booster packs. The only way to obtain them is to buy one of the pre-built Commander decks. These decks have fixed deck lists, so every deck you buy has the same 100 guaranteed cards in it.
However, the Commander cards do have different rarities. For example, the Commander 2016 card Army of the Damned is a mythic rare, while Windfall is an uncommon. These two cards both appear in the 2016 deck Entropic Uprising, and no others. In other words, when purchasing Commander decks, you will always get the same number of Army of the Damned as you do Windfall, but they are somehow different rarities.
In addition, the distribution of rarities in the deck is off as well. Again, using Entropic Uprising as an example, there are 5 mythic rare, 33 rare, 26 uncommon, 15 common, and 20 land.
How are these rarity levels determined if there is no randomness or normal distribution of cards in the set?