Agreed, but quality products are designed to continue operating as best as possible when components fail. You can definitely take that overboard to extreme level, but a basic think through of especially common failure causes (like ear junk buildup) and design around it is what great product designers do.
Based on the noises I experienced that time, I think the microphone was detached and hanging by a wire. The sound was rhythmic and depended on my movement, kind of like what would happen if you had a bell hanging on a pendulum inside a cylinder. I don’t think this was caused by debris buildup on the device. To Apple’s credit, whenever I had a defective AirPod, it was easy to get them to replace it. Happened to me multiple times in the first few months of the AirPods Pro release.