Pupitar and Shelgon have always fascinated me, because they’re cocoon stages for Pokémon that aren’t insectoid at all, but draconic. You’d think that if any draconic Pokémon would have a cocoon stage it’d be Flygon, the actual insectoid dragon. Why do you think Tyranitar and Salamence have to go through cocoon stages? And why not Dragonite, Hydreigon, or Goodra?
Hard to say, and to be honest I suspect the answer is just that the designers want to keep us guessing (it’s kind of just an interesting idea in itself; I’m sort of fine with it if it doesn’t come from anywhere). I had another question one time that touches on something similar, with regard to the Bug Pokémon that either have or don’t have cocoon stages, and there my attempt at an answer was that the ones with cocoon stages are the ones that evolve the fastest, and therefore need a form that is solely devoted to hoarding energy, but that doesn’t really help us with these ones. I can tell you that we don’t really need Flygon to have a cocoon stage, because although Flygon is loosely insectoid, she seems like she’s specifically a dragonfly, and dragonflies don’t have pupae; they start out as small, wingless dragonflies (“nymphs”) and shed their skins a couple of times to grow into full-sized winged dragonflies.
I have no idea what inspired Shelgon’s stone pumpkin appearance, and I don’t think anyone else does either; I even went to Shelgon’s page on ポケモンWiki, the Japanese equivalent of Bulbapedia, and fed it through Google Translate to make absolutely sure they didn’t have any secret insights that the rest of us were missing (and when I start putting Japanese text into Google Translate you know I’m desperate, because Google Translate is appalling at Japanese). I half want to say that Shelgon was actually inspired by Pupitar, but even that just kicks the problem further back. Pupitar’s hard to make sense of too, because Tyranitar isn’t really draconic exactly, he’s more Tyrannosaurus-by-way-of-Godzilla, and although there are some Kaiju with larval and pupal forms, Godzilla isn’t one of them. I’m beginning to think that the designers just didn’t have any satisfying ideas for more predictable-feeling middle stages for Bagon and Larvitar, so they just decided to do something offbeat and quirky – which is fine by me.
EDIT: Random Access adds: “Maybe the larvitar line is a reference to kaijus in general, and put a pupa stage in there just to get some mothra inspiration in there.”
Which makes as much damn sense as anything else I can come up with.