The purpose of D&D is to have fun, but the purpose of the XP/CR/THAC0 rules is to provide structure, and to manage expectations.
D&D is like any other game. Take baseball. We play baseball because it's fun, but that doesn't mean we play without rules. Otherwise it would easier to get home by just running directly to third and then back. I mean, why bother with first and second? That, like, takes twice as long! Duh!
Really what the rules are in baseball or soccer are unimportant, just so long as everyone agrees. In fact, making up the rules to competetive sports is much easier than the rules to an RPG because both sides must live by them, and therefore everything is automatically "balanced." The rules apply to everyone equally, and there are no options.
In RPGs the whole set-up is much more complicated. 1) Everyone is on the same side (in theory) and 2) You choose which particular rules apply to you. You can choose the Dwarf/Fighter rule-set, or the Elven/Wizard rule-set, or any other hundred combinations. Therefore, to be fair between the players who are all on the same side, we must make sure all of these choices are valid and "balanced."
What is balanced? Why do we make home rules to make things balanced? Consider my "home rule" for baseball when I was a kid: Brian must bat lefty. When Brian batted righty it wasn't much fun for the rest of us, because, well, we were D&D dorks who sucked at baseball. Some people might say we "nerfed" Brian's batting ability, but we what really did was make the game more fun. We still had the basic structure of baseball, and we all had the expectation that we would be able to contribute something to the team effort.
The CR/XP/whatever rules are a starting point, like the basic rules of baseball or any other game. Even "Tag, you're it" and "house" have rules. It may be a sign of maturation to say "Hey, let's change things!" - but it may not. 1) You may not be really ready to change the rules because you don't fully undertand them and 2) some people like to play the game as is, and changing the rules makes it less fun for them.
So yeah, the purpose of D&D is to have fun, but the purpose of the rules is to allow playing D&D to be fun. Whether you use all of the rules in the book, or some of your own, is irrelevant. It's just nice that WotC did a lot of the heavy lifting and has given you a place to start from.
Mac Callum