It is a combination of component price, and volume. .22 RF is the most commonly used commercial ammo by orders of magnitude, so it is not surprising to find it to be the lowerst priced. It also uses "simple" swaged lead bullets, tiny thin cases and bitty powder and priming charges. The .22 Mag uses thicker cases and jacketed bullets, along with more powder and primer compound. It is also loaded in just a tiny fraction of the numbers that the .22LR is loaded.
The .22 Hornet is a far different animal. Not a rimfire, it uses thicker cases that are much more difficult to make, a separate centerfire primer, more of a different costly propellant, and jacketed bullets - all wraped up in even lower production numbers.
Inventory costs also play a big role. .22 RF ammo flys off shelves pretty fast, with little of an order remaining after a few months. Hornet ammo is much less used, and may sit on the shelf for a lot longer than the RF ammo - years perhaps. Smart business men consider inventory costs when they price their products, or they face declining profits on those items. I do not know the exact value for every dealer, but for some dealers their inventory costs about 1% per month. A box of Hornet ammo which cost the dealer $20/box from the distributor costs him $22.40 a year later - if not sold.
.