Are we an answer factory, or are we here to educate?
Some of both. We're not here to just do one or the other. A lot of it depends on the person asking the question, moreso than anything else. If someone is here just to get and answer, and not to learn anything, you're going to have a really hard time teaching them against their will. Likewise, if someone is here to learn and isn't so interested in a specific solution to a narrow problem (and it's reflected in the question, which is often the case) then only posting a specific solution is not helpful, and the members of the community can often recognize that and act accordingly.
So if you're particularly interested in teaching concepts, rather than solving programming problems, then seek out those questions that are clearly looking for those types of answers. Avoid questions when there are clear indications that the OP has no intention of learning the concept themselves. (If you can't tell, then just learn how to get out of a question once you have determined that the OP isn't interested in what you have to offer.)
I've been reading Stack Exchanges far longer than I have been participating in them, but I have noticed a trend of people answering questions without a sufficient level of context or information about the subject matter; in some cases leaping at a "correct" answer without showing any of the thought, understanding or research in the middle.
And in some cases that can be the most helpful, in others it's the best that we'll be able to do, and in other cases it's not appropriate and should be discouraged.
It can be helpful if it's a situation that the OP is simply not likely to be in again, and the information needed isn't particularly applicable in other areas. For example, perhaps the OP's problem is simply related to a bug in the framework code they're using. No in-depth explanation is really needed most of the time. Just say it's a bug and post a workaround. There's really no need to explain, in depth, what isn't working, why, how it might be fixed, etc.
In some cases, as I said earlier, the OP simply isn't interested in being taught anything. Rather than forcing knowledge on them, it's often best to just not spend your valuable time trying to teach them something they aren't interested in. Find other questions to spend your time on.
Finally, when a question is asked in which it's clear that the asker is interested in learning, that they are hoping for an explanation of a concept, rather than a solution to a particular problem, and someone posts an answer with no explanation and just code, you have ways of addressing that. First, you have voting. Vote up answers that have a good (and correct) explanation. Vote down answers that don't try to explain anything. If there are no answers with a good explanation, add your own. Consider posting comments on an answer without an explanation asking them to explain their answer further (just try not to get in arguments over it if it's clear they have no intention of adding one).
The SE model is designed such that the community is responsible for addressing most undesirable behavior on the site. When it's clear that an answer provides insufficient explanation the community ought not to upvote it. At the very least, you can do your part in that regard and vote based on what you feel is helpful. While some people will always disagree on what is and isn't helpful (which is okay), the end result is that people's actions adapt to reflect what most people feel is for the best. Is this always ideal, no, but it's proven highly effective thus far in encouraging high quality answers. You can make your voice heard as a part of the community.