There are several reasons why this is the case. First, and foremost, if you are about to die from anaphylaxis, it is far easier to jam an autoinjector needle into a muscle than it is to try to find a vein to inject or inhale the epinephrine (the primary drug in the epipen). Secondly, intramuscular injections are an easy way to deliver a drug, and they have a rapid onset (i.e. within seconds to minutes) as opposed to orally (which is typically much longer). Third, the leg is by far the largest muscle you can target yourself, and so access is easiest there. Finally, you should know that epipens are not the only rapid acting IM devices made. For example, atropine injectors are given to soldiers in the military for self use in the event of a nerve agent attack.