They also don't hear the blood going through their veins, although that is a popular misconception. What is it exactly that causes the roaring sound when the shell gets close to your ear?
Children are told many ridiculous things over the course of their slow slog towards adulthood. Many of those things, they believe, until experience or the mocking laughter of their peers causes them to think again. But the idea that putting a sea shell up to their ear can let them hear the ocean is something that seems silly immediately. For one thing, the sound is nothing like the ocean. Generally it's a steady, diffuse hum instead of any kind of actual tide. For another, it only works with deep sea shells. If this property is really magic, it hardly seems likely that it's exclusive to some shells and not others. The whole thing seems like a con.
And it is, and so when, later, kids are told that the roar they hear is the pound of their own blood in their ears. Alas, the youth are still being led astray. The 'blood flow' explanation doesn't bear up, since differences in pulse or blood pressure don't give anyone a different sound.
The roar that people hear in the shell is not much more than the reflected sound from the walls of the shell. At any given time, there are a lot of sounds bouncing around in a room. Since most of them don't concern us, we can ignore them. Put a shell close to your ear, though, and at least a few of those sounds will be reflected back uncomfortably close to you. Now you can hear them. The shell shape and texture alters the sound the same way the shape of your mouth alters the sound of the words you make.
But standing near a wall, or a short hallway, doesn't give the same roar that a shell does. Since the wall is bigger, it should reflect more sound, right? So why are walls quiet while shells are loud? It turns out that shells have pre-loaded springs of air inside them. As the sound waves get channeled into the shell, they are squeezed into a small space, when they come out, the air inside the shell overshoots, leaving a little less pressure inside the cup than outside. That draws air back in, and the whole process amplifies the sound - which after all, is pressure waves of air. A wall gives the air too many escape routes, and the pressure needed to start off the Helmoltz resonance isn't built up.
Or there's a tiny ocean in there. Whatever you want to believe.