Militia's attack is much much weaker when you've got a deck with high standard deviation in its card values, i.e. you have some really strong power and really bad junk, so discarding two isn't so bad, 'cause you can ditch the junk without much pain.
Ghost ship is a bit more complicated, but depending on how junked up your deck is, it's also weaker in junky decks. That's because haven/courtyard kind of effects matter much more (positively) for those decks. Here's what I mean: think of a deck with 2 golds, 4 silver, 7 copper, and X worthless cards - curses, estates, duchies, whatever. Now, if this deck gets ghost shipped, it's going to be really hard to get those 2 golds together with a silver to get to 8; if X were small, then the deck would be in great position to be grabbing a lot of green pretty quick, and the ghost ship is therefore a significant impediment. If X is large, you've got to do quite a bit more build-up anyway, and you really need golds. So if I have silver silver copper estate curse, I have two pretty good options: put both silvers back in an effort to get up to gold next turn, or put silver and a junk card back, grab silver and hopefully something good. And chances are, I'm not getting ghost shipped every turn, because you have a bunch of junk too. If I have a lot more curses than you, I'm probably lost anyway.
Actually, the other thing is that you can circumvent the long build-up fairly often anyway, and aim for duchies and a three-pile. Which gives even more options.
In general, more options is better, so more variety when getting shipped is better for you. The reason that's not true with your hand of five golds is that what you actually need is only one good option - you're more likely to have that with more options, but it's not JUST options that give you a good option. But also, if you have 5 golds in your hand reliably, either you're playing treasure map (in which case, I shouldn't have gone ghost ship!), or you're playing very poorly.