Why does it matter? Well, here's my stab at answering that question:
First off, one would expect that if parts are serialized, they will match. Does the OEM barrel on your $450 Glock have a matching serial number for the slide and frame? Yep.
Secondly, only certain people are financially able and willing to drop $3K on a brand new gun and they expect certain things when they do. HK's become collectable - just look at what an HK91, HK93, SR9, SL8 all go for compared to what they initially cost. While you may not be a collector, or you may purchase your HK just to shoot it, many, if not most who buy high-end HK rifles do so with the collecting aspect in mind in addition to the functional aspect.
Thirdly, for example, what's the value of a non-matching K98 versus an all-matching K98?
Those are likely why it matters and why OP asked.