Any serious concept can be played for laughs. Even boring things, like food and water, can be interpreted in such a way as to make them seem ridiculous.
You don't have to go full-on Highlander with the way that experience works. You can simply observe that, as individuals go out on adventures and overcome obstacles, they get better at doing the things that they do. There's nothing silly about that. If you're willing to buy into the assumption that adventurers use their skills and other abilities at a fairly consistent rate, then you can even use the power of the enemies that they overcome in combat, as the metric for how much they use those skills. (That assumption doesn't always hold for every campaign; and the further you deviate from that premise, the less the system makes sense; but it's perfectly reasonable for a wide variety of D&D games.)
Likewise, there's nothing in the book that tells us how non-adventurers improve at anything. You could take that to a ridiculous extreme, and assume that it's impossible for anyone to ever get better at anything unless they fight for it, but that's not a reasonable position to take. Just because they don't give us the rules for it, that doesn't mean it's impossible; it just means we don't have the rules for it.
I really mean that XP is not a meta-game concept, in D&D. It's just a mathematical simplification of the real-world concept of learning by experience, which is something that we should all understand. That's why it's called "Experience".
There are other games which borrow the XP terminology from D&D, but which treat it as a meta-game resource for the players, rather than having it represent the actual experience of the character. Such games tend to award XP for player participation, and for staying in character.