That's a good question, I think it's a combination of all of the above.
For both brands, I think the economy hurts, and a lot of Hasbro's choice of figures for things like the comic packs for Star Wars especially. There's some questionable figures packed into many of those for sure. A lot of their exclusives are in a similar boat.
Regarding GI JOE, I think a lot of the problem might be something Hasbro admitted - their figures were priced too high. They also seemed to overproduce the first couple of waves of ROC figures, which is something one would think a company like them would figure out. They should have the foresight to understand that if the first couple of waves of figures is overproduced, it's going to cause later waves to have problems shipping (I think that's part of the problem with Legacy as well).
In most aspects, I blame Hasbro. They're a big enough company with more than enough resources to get things figured out. When things go wrong, it seems they like to point their finger to their consumers quite a bit though, which I think is disgusting. This is all just my personal opinion though.