It happens frequently in math that problems have multiple possible solutions. This might become troublesome, e.g. when students use some other approach, hence, not learning the current topic.
One could say that it is the task that is wrong, but in many cases examples which require the more complex approach are too hard to use for introduction. This leaves us the "solve using X and without using Y," but it seems artificial.
There are also problems with grading - one would like to check the understanding of the advanced techniques, but appropriate problem might be to hard for a short test.
Are there methods for encouraging the use of a particular approach?
Edit 2: For example when teaching logical connectives, students learn the "table approach" first, and then get to know some other laws, like De Morgan's, distributivity, etc. Then, many times, instead of using a series of reductions, they create a big table (e.g. if there are multiple variables) and do not practice the transformations enough. And then it happens again, when they learn sets and use repeatedly element-chasing instead of algebraic methods.
Another example could be from computer-science. It happens that during abstract algebra courses students learn about matroids and perhaps that some graph-theory concepts are expressible using those structures. Then, in some algorithm-design class the intended proof might be to create an algorithm which constructs the solution (and in the process prove the solution exists), but students might use the properties of matroids, frequently just remembering the facts and not understanding them.
Edit 1: One possible example is when you have to find the extrema of the function $$f(x,y)=x^2+y^2-2x-4y+9.$$ You can solve this by calculus techniques with derivatives, but also by writing $$f(x,y)=(x-1)^2+(y-2)^2+4.$$