Not every missile that comes at you is going to be with you standing there waiting to jab them. Comparably to doc's pills, they don't seem like a problem initially because you can just swipe them away but you still have to deal with them, and situationally (like after you've gotten hit already) they can force you out of position.
There's no reason Marth v Samus should be any worse than Marth v Peach/doc/ICs where basically the same dynamic is taking place where Marth can keep them out well but they can hurt him when they hit him. Samus may honestly be better equipped than some with her CCs and OOS game, plus just hanging around forever.
And on the issue of "Marth shouldn't be getting hit if he plays correctly", you can't overlook that Marth's punish is just terrible on Samus. This means Samus can take much more risks than characters typically can against Marth, because there's very little consequence for it. So yea, throw out a dsmash, see if it gets under the shield. What's the worst that can happen? Get grabbed? Fair out of shield? Meanwhile her payoff is pretty nice if that lands. It's way easier to break Marth's spacing if you don't have to be too concerned about missing or getting hit. The matchup just doesn't play out as linearly as I think some people are making it out to.