I sometimes think about what students hear when we (their teachers) talk. I don't think undergraduate students (even good ones) manage to grasp the essentials of mathematics. I don't think they see what we are doing as logical reasoning based around some fundamental principles. They hear the specific words and explanations for a particular problem, but don't grasp that what we say comes from some coherent system. This is not necessarily because we don't say that this is so. It just seems that this concept doesn't completely register in the time we have them. It might later, or it might not.
When, for example, we want to find all solutions to x2 = x, I might suggest dividing both sides by x, getting x = 1, which is one solution. I then note that we can only divide by x if we assume x is not zero, and in fact x = 0 is the other solution. We then have all solutions to the equation. To me, at this point in my life, I see division of both sides of an equation as a legal operation with very specific restrictions (namely, that we cannot divide by zero). I also recognize that since we can view both sides originally as multiplied by x, that x = 0 is certainly a solution. But I remember when things were not quite so coherent, and then the step back to note that we cannot divide by zero seemed like a trick just to justify a zero solution. It seemed that a lot of algebra (and some other mathematics) was made up of a bunch of special rules and exceptions, and it seemed like teachers had a never ending supply of these to pull out to justify whatever they said the answer was. It seemed a bit like playing pretend with a small child, where there is an exception to everything, to be made up on the spot: "Oh yeah? Well I had my invisible anti-force field magic belt on, so I could escape from your force field!"
How do people learn to see mathematics (or any field) as a unified whole? Perhaps part of it comes from time and experience. It may just take a certain amount of time working with the concepts before they become solidified and can be deftly manipulated. It may be similar to the feeling I can still remember in college, when I became sufficiently comfortable with algebraic manipulations that I could use them to do faster mental arithmetic, by disassembling and reassembling the numbers in convenient ways, making the numbers dance as needed. It's not that no one had ever suggested the idea before; it's popular to present these ideas to students, but until those concepts are internalized, it doesn't make mental arithmetic any easier. It just seems like a trick--and a somewhat painfully difficult one, at times.
Or maybe we need to give students more opportunity to see mathematics as a unified whole from the beginning. That would be one reason I've for years pushed for depth over breadth. Whenever a curriculum issue comes up, my first thought is usually, "What can we cut out?" Skimming quickly over dozens of topics and techniques encourages that sense of mathematics as a big collection of tricks, rather than something that has meaning and can be reasoned about. We need time to think about ideas, process them, wrestle with them, and make them our own. If students can understand a few concepts deeply, they'll have a better chance of figuring out something new on their own.
For the same reasons, I also feel drawn to inquiry based learning or Moore method teaching, where students are asked to figure things out with minimal guidance. We start with a few ideas--say, some definitions and a few axioms--and students are asked to build on that framework. Each new step has to be justified, and students need to figure out what works and what doesn't, without being told specifically what to do or what's right and wrong. They should rather be led by careful questioning to notice for themselves what works and what doesn't. If instead of just saying, "No, that's wrong," the teacher can simply present another problem and let the students figure out that their previous approach is flawed, they may internalize the structures much better. After all, structures you yourself have built are already essentially internalized. And it's hard to view a subject as filled with arbitrary tricks when you yourself have built up those "tricks" because they were needed.
In any case, what I would most like is for the students to come away with a sense of my subject (and others) as a unified whole, as something they can investigate and reason about, rather than just a collection of tricks and techniques. The techniques are useful, and the tricks are powerful, but without a strong foundation, it all falls apart.