Yeah, that happens to me but rarely. I find that it happens only if I bring in the chain very slowly, such as by using the windlass. My remedy is to pull in most of the chain by hand, let it drop smartly down the pipe. I use the windlass only to break loose and raise the anchor. Doing that, the chain hardly ever piles up.
More often, the chain gets stuck in the pipe bend. When that happens, I simply pull a foot or two back out of the pipe and drop it again smartly. Attached objects, such as length markers, greatly increases the chances of chain getting stuck in the pipe. I tried soft ties, and I tired plastic wire ties. Now I switched back to painted makings.
On rare occasions, if I have 200' or more of chain to bring in, it piles up anyhow and I have to do as you did and go below to knock down the pile.
Happy anchoring.